You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ResourceResolverMapTransformerFactory configured to rewrite img:src
Expected Behavior
On author the assets UI should display images.
Actual Behavior
On author the assets UI displays no images, neither on tiles/cards or in the asset-detail view of an individual image.
Steps to Reproduce
Set up ResourceResolverMapTransformerFactory to rewrite img:src on an AEM 6.3 author.
Navigate to /assets.html into a folder containing images.
Analysis
The code rendering the assets UI calls org.apache.jackrabbit.util.Text#escapePath on the thumbnail URI (actually the web rendition in this case).
Hence the ResourceResolverMapTransformer gets an encoded path, more specifically with the "jcr:content" part encoded as "jcr%3acontent". Calling ResourceResolver#map on this doesn't achieve anything, as the path cannot be found in the repository. So no namespace mangling or other mappings are applied.
For some reason, I'm not quite sure if that's the rewriter pipeline, the URI-encoded "jcr:content" ends up rendered double-encoded, i.e. "jcr%253acontent", leading to a 404 when the browser loads the image.
Required Information
Expected Behavior
On author the assets UI should display images.
Actual Behavior
On author the assets UI displays no images, neither on tiles/cards or in the asset-detail view of an individual image.
Steps to Reproduce
Analysis
The code rendering the assets UI calls org.apache.jackrabbit.util.Text#escapePath on the thumbnail URI (actually the web rendition in this case).
Hence the ResourceResolverMapTransformer gets an encoded path, more specifically with the "jcr:content" part encoded as "jcr%3acontent". Calling ResourceResolver#map on this doesn't achieve anything, as the path cannot be found in the repository. So no namespace mangling or other mappings are applied.
For some reason, I'm not quite sure if that's the rewriter pipeline, the URI-encoded "jcr:content" ends up rendered double-encoded, i.e. "jcr%253acontent", leading to a 404 when the browser loads the image.
I suggest to URI-decode the attribute value before passing it to ResourceResolver#map in ResourceResolverMapTransformerFactory.java#L95.
The text was updated successfully, but these errors were encountered: