cancel
Showing results for 
Search instead for 
Did you mean: 

Sitemap.xml generating but not reflecting on website

0 Kudos
994

Hi,

We are using the OOB SiteMapMediaJob to generate the sitemaps. It work fine and is generating 7 different xml which we can see in cms site through hmc.

  1. The xml are not named as sitemap.xml but as Product-en-USD-1998943966038873537.xml, for example.

  2. when we go to https://localhost:9006/storefront/sitemap.xml it still shows the old sitemaps with only few products.

Do we need to manually rename and upload the generated sitemaps to specific location?

rohit31_raj92
Active Participant
0 Kudos

You need not to rename them and manually upload just try if those are updated one? If no then please delete the old sitemap xmls and run the job? This should resolve the issue

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Are you trying to check the product sitemap after running the job and reloading https://localhost:9006/storefront/sitemap.xml ?

Just FYI.. Job creates a new media instance for each sitemap (Ex. Product, Category..) every time it runs.

So, please check once the latest job runs successfully you are trying to use the latest media URL of generated XML.

Thanks

0 Kudos

Hi Sumit,

Yes, when I go to CMS site and download the sitemap from there I can see that the sitemap is update one with the new products.

Former Member
0 Kudos

, So the issue is resolved or you are still facing the same issue?

0 Kudos

Hi Sumit, No, I still see existing sitemap.xml on website. But when I go to hmc->website and open the website I can see few sitemap.xml media generated correctly and stored under website.

Former Member
0 Kudos

, do you have multiple sites in your application?

Please try to check SiteMapController while accessing the sitemap this might help.

Please keep us updated on this issue.

Thanks

0 Kudos

Hi, yes, it's a multiple site configuration but currently I have configured only for 1 country. . I am unable to find to find SiteMapController.java, do you know the location ?

Former Member
0 Kudos

If it is multiple site configuration, can you please try to access the sitemap with your site URL, not with localhost? ex.https://siteurl:9006/storefront/sitemap.xml or https://siteurl/storefront/sitemap.xml

SiteMapController should be in your storefront extension. path : /yacceleratorstorefront/web/src/de/hybris/platform/yacceleratorstorefront/controllers/misc/SiteMapController.java

0 Kudos

Thanks Sumit, found the controller. Let me debug in local. But even when we created the sitemaps in our dev server cms site it is not reflecting.

https://dev-services.gehealthcare.com/gehcstorefront/sitemap.xml

0 Kudos

Got the issue. We have a custom controller for sitemap because of which it was having the issue.

Former Member
0 Kudos

Good News..!!! Thanks for sharing the root cause.

Answers (2)

Answers (2)

rohit31_raj92
Active Participant
0 Kudos

Hi

The names of the sitemap for product is correct as this is by default ootb naming convention. You can check the sitemap generators for different types. Did you able to re run the cron jobs and see if those are still not getting generating?

Can you please delete the old sitemap xmls and then run the job again and tried it? Sometimes the changes doesn’t reflect so we may need to refresh the sitemaps xmls

As you mentioned you are able to see changes in hmc did you saw the updated products in the xmls ?

0 Kudos

Hi ,

Thanks for the quick reply. Yes, in hmc it shows updated sitemap with around 80k products but on the storefront/sitemap.xml it just shows home page url. I will restart the local server and check and update the result here.

0 Kudos

Forgot to mention that we are using hybris v6.5

0 Kudos

Not working even after server restart. My localhost url is as below and for sitemap.xml I using the below url

https://localhost:9006/healthcarestorefront/?clear=true&site=healthcareSite_US

for sitemap https://localhost:9006/healthcarestorefront/sitemap.xml

rohit31_raj92
Active Participant
0 Kudos

Hi Can you put debug inside the ProductPageSiteMapGenerator and then try to check what is the final query getting generated and see if that query is resulting into any result or not.

former_member620692
Active Contributor
0 Kudos

Hi - the name of the file is correct as per the default implementation. Please check https://help.sap.com/viewer/4c33bf189ab9409e84e589295c36d96e/1905/en-US/8adb25b386691014af16eb036124... for more details.

It will also be helpful to check ProductPageSiteMapGenerator.java and AbstractSiteMapGenerator.java to understand how the name of the file is formed.

You can execute the query given in ProductPageSiteMapGenerator to find out which products will be there in the file.

0 Kudos

Hi Arvind,

Thanks for the pointers.

0 Kudos

Forgot to mention that we are using hybris v6.5