ReplicationAction not finding generated sitemap hence 404 | Community
Skip to main content
Level 2
December 3, 2024
Solved

ReplicationAction not finding generated sitemap hence 404

  • December 3, 2024
  • 3 replies
  • 1345 views

Hi There,

 

We have sitemap generator working perfectly for top level locale files (i.e us/en/sitemap.xml). However when it comes to lower level pages sitemaps, ReplicationAction is failing to find those files due to path mismatch. For example sitemap for /us/en/about-us/newsroom page is generated under /var/sitemaps/ and as

 

/content/xxx/us/en/about-us-newsroom-sitemap.xml.

 

However ReplicationAction is failing to find resource under 

 

/content/xxx/us/en.sitemap.about-us-newsroom-sitemap.xml

 

Which means ReplicationAction is finding file at wrong place or generated name is incorrect. I dug into ReplicationAction documentation but could not find where I can force it to look into right folder and files. In logs ReplicationAction is failing with following warning

 

*WARN* [sling-default-1] com.adobe.cq.cloudconfig.core.impl.ConfigurationReplicationEventHandler Resource [/content/xxx/us/en.sitemap.about-us-newsroom-sitemap.xml] not found for ReplicationAction and hence throws 404 when it is accessed on publish instance

 

Request community's help

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by bagwanpankaj

After much of debugging, I finally found that path and names of sitemap files differs between Author and Publish instance. And That warning in log for replication added to confusion. Finally I am able to access files using different filenames on publish instance. 

 

Though this is not expected behavior from AEM CaaS

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 3, 2024

Hi, 

Are you using a custom sitemap generator? Or the ootb Sling sitemap generation?

Esteban Bustamante
Level 2
December 3, 2024

I am using AEM sitemap Generator with custom code by extending ResourceTreeSitemapGenerator

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 10, 2024

Hi,

 

This behavior probably makes sense. The reason this is not common is that you should not replicate the sitemaps from the author to the publisher. Instead, you should configure the publisher to generate a sitemap with content specific to the publisher. If you're trying to replicate from author to publisher, you might also encounter inconsistencies, as the content published on the publisher is not always the same as all the content available on the author.

 

Please check this: https://experienceleague.adobe.com/en/docs/experience-manager-learn/sites/seo/sitemaps#sitemap-scheduler-osgi-configuration 

 

Hope this helps

Esteban Bustamante
Level 2
December 10, 2024

Hi @estebanbustamante,

 

Thanks for the kind reply. I already followed that page while implementing sitemaps and our sitemap scheduler configuration is placed under config.dev/ config.stage/ and config.prod/ and I suppose this may be automatically applied to both author and publish instance for those environment.

 

And we have not made anything that would replicate  sitemaps from author to instance. I was just digging logs and found error as mentioned above in logs, so I thought that could be the issue

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 10, 2024

So, what you pointed out is a "Warning." Is there any issue happening with the sitemap generation? The best way to troubleshoot is by starting a local Publisher instance and checking if the sitemap is generated under /var. I haven’t had any issues in the past using the out-of-the-box Sling sitemap generator.

Esteban Bustamante
kautuk_sahni
Community Manager
Community Manager
December 16, 2024

@bagwanpankaj Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni