1

I am trying to fetch Sitemap in my NextJs app using GraphQLSitemapXmlService plugin. This is XM Cloud and I am using Preview API locally. During investigation, I realized that it is fetching response from following query which returns blank data (even in playground board). I have confirmed that other services are returning data like GraphQLRobotsService. What could be the problem?

(FYI, CM site also returns data with sitemap url)

query SitemapQuery($siteName: String!) {
   site {
     siteInfo(site: $siteName) {
       sitemap
     }
   }
 }
1
  • Are you fetching from the preview end point or the published end point?
    – Richard Seal
    Jul 14, 2023 at 23:30

1 Answer 1

1

If you are using Experience Edge, you will need to store Sitemap in Media Item (This is recommended for XM Cloud version).

enter image description here

https://doc.sitecore.com/xmc/en/developers/xm-cloud/configure-a-sitemap.html

And make sure that you have media folder selected in Site Item's Sitemap media items field -

enter image description here

Hope this helps !!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.