[ 
https://issues.apache.org/jira/browse/WICKET-7146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Voges updated WICKET-7146:
--------------------------------
    Description: 
The fix for WICKET-7024 compromises the use of 
{{TextTemplateResourceReference}} with variations.
 
A {{TextTemplateResourceReference}} might use the variation to create a dynamic 
resource. The fix for WICKET-7024 introduced a sanitazation, which matches 
locale, style and variation from the url with the resource from the filesystem. 
As {{PackageResource#sanitize}} will clear the variation, no matching 
{{ResourceReference}} can be found in the {{ResourceReferenceRegistry}}. The 
ResourceReference will in turn not be served by the intended 
{{TextTemplateResourceReference}} but from a newly created 
{{ResourceReference}} from the {{DefaultResourceReferenceFactory}}. 

This does not effect statically mounted resources, as they are not handled by 
{{ResourceReferenceMapper}} but by {{ResourceMapper}}.

I can provide a integration test if necessary.

  was:
The fix for WICKET-7024 compromised 
{{TextTemplateResourceReference}} with variations.
 
A {{TextTemplateResourceReference}} might use the variation to create a dynamic 
resource. The fix for WICKET-7024 introduced a sanitazation, which matches 
locale, style and variation from the url with the resource from the filesystem. 
As {{PackageResource#sanitize}} will clear the variation, no matching 
{{ResourceReference}} can be found in the {{ResourceReferenceRegistry}}. The 
ResourceReference will in turn not be served by the intended 
{{TextTemplateResourceReference}} but from a newly created 
{{ResourceReference}} from the {{DefaultResourceReferenceFactory}}. 

This does not effect statically mounted resources, as they are not handled by 
{{ResourceReferenceMapper}} but by {{ResourceMapper}}.

I can provide a integration test if necessary.


> Resources from Filesystem will always be served by PackageResourceReference 
> regardless of registered ResourceReference if used with variation
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-7146
>                 URL: https://issues.apache.org/jira/browse/WICKET-7146
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 9.19.0, 10.3.0, 8.17.0
>            Reporter: Simon Voges
>            Priority: Major
>
> The fix for WICKET-7024 compromises the use of 
> {{TextTemplateResourceReference}} with variations.
>  
> A {{TextTemplateResourceReference}} might use the variation to create a 
> dynamic resource. The fix for WICKET-7024 introduced a sanitazation, which 
> matches locale, style and variation from the url with the resource from the 
> filesystem. As {{PackageResource#sanitize}} will clear the variation, no 
> matching {{ResourceReference}} can be found in the 
> {{ResourceReferenceRegistry}}. The ResourceReference will in turn not be 
> served by the intended {{TextTemplateResourceReference}} but from a newly 
> created {{ResourceReference}} from the {{DefaultResourceReferenceFactory}}. 
> This does not effect statically mounted resources, as they are not handled by 
> {{ResourceReferenceMapper}} but by {{ResourceMapper}}.
> I can provide a integration test if necessary.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to