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.
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?
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.