Simon Voges created WICKET-7146:
-----------------------------------
Summary: 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: 10.3.0, 9.19.0, 8.17.0
Reporter: Simon Voges
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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)