Dear community,
We're using 6.5.9 with aem project archetype 35.
As I published pages with image component, the page layout and assets in the component did replicate to DAM on publish instance,
but the src of image cut the "content/{project_name}" in URL, so the image cannot find the src.
I tried other demo site on instance (weretail, wknd), there is no problem on publishing image component.
I also checked this thread on community: Images are not loading in publish instance
and modified/deleted org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.cfg.json on 4503 instance.
But it did't work and crashed the url of the page on publish.
I know on publish or dispatcher, the website hides the folder of assets with rewrite rules,
but the default setting should not crash the src.
Can anyone help me with this issue?
Thanks!
img on author:
img on publish:
Solved! Go to Solution.
Views
Replies
Total Likes
because of this rule, the path is getting trimmed on publish. if you don't have the rewrite rule then you need to remove this config.
Hi @YuSheng ,
You must be having a custom link rewriter in your publish instance. Please check /apps/<project>/config/rewriter folder if it does exist.
Please check the below video for your reference-
https://www.youtube.com/watch?v=0fM2vUEj2bA&list=PLzwWOJSdKWBf7zLga8P7-ARxFQRwGGd94&index=30&t=237s
You can also consider using internal redirect map if you really want the truncated URLs (without /content/<websitename>) in asset paths and still want them to load.
https://medium.com/magmalabs-blog/how-to-use-internal-redirects-in-aem-ed465a61a24b
Thanks,
Ritesh Mittal
Can you check if you have a osgin config at
/apps/__appId__/osgiconfig/config.publish/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.cfg.json
The mapping is defined by default
{
"resource.resolver.mapping": [
"/content/${appId}/</", "/:/"
]
}
because of this rule, the path is getting trimmed on publish. if you don't have the rewrite rule then you need to remove this config.
Thank you @arunpatidar, I removed the config node and it works!
Views
Likes
Replies
Views
Likes
Replies