Expand my Community achievements bar.

Sitemap generator not working properly

Avatar

Level 2

Hello everyone,

 

I have a problem with the creation of sitemaps via scheduler with custom generator, in aem. Locally, as well as in the various cloud environments where the project is deployed (dev, stage, prod), this situation occurs:

 

The generator is called correctly, but when I try to open e.g. the usa site /content/site_name/us.sitemap.xml I get a 404 error.
Going to check under the path /var/sitemaps, there is a strange situation: us-sitemap.xml files are created instead of the us folder and then the sitemap.xml file. Even trying to call up the servlet via /content/site_name.us-sitemap.xml does not work.

 

Screenshot 2023-01-12 at 13.16.05.png

 

 

 

I tried reinstalling all the code in a new instance, with the same sdk version (also the same version of the cif components) and strangely enough the sitemap is created correctly.


I cannot figure out what the problem might be, as the sitemap configurations are the same in the two local instances. Unfortunately, in the various Dev, Stage and Prod environments, the same non-working situation occurs as in the first instance.

Do you have any ideas on what to check that might affect the creation of sitemaps in one path instead of another?

 

Thank you!

5 Replies

Avatar

Level 2

Hi Harishv31,

 

I had already found that article and I double checked now. I think I've followed all the guidelines correctly. It is really strange how the path gets created like us-sitemap.xml, under the var folder.

 

Thanks anyway

Avatar

Level 2

Hi, 
anyone has an idea of why this is happening ? Could it be the externalizer inside the custom sitemap generator?

 

We are stuck with this problem and the only solution that we could think of is to write a custom sitemap xml servlet.

But we would really like to use the ootb functionality for sitemap.

 

Thank you

Avatar

Level 5

hi @Guglielmo89 - Can you please tell once site structure and node where Generate sitemap checkbox is being checked.

Avatar

Level 1

The same thing happened to me.

 

My solution: Shorten the scheduler to short intervals for local testing. The scheduler won't generate a sitemap file until the next scheduled run.

 

This behavior is confirmed for me for local and AEMaaCS instances.