Sitemap.xml not showing

Google sitemaps module (https://github.com/wilr/silverstripe-googlesitemaps)

I installed Google sitemaps module using composer, added the suggested googlesitemaps.yml file and copied and pasted suggested config (removing the tabs with spaces), did a dev/build and went into one page to choose a specific Page Priority.
When I try to access the mylocaldomain/sitemap.xml shows an empty white page and on https://mydomain.com/sitemap.xml it seems I am in a loop (page reloads forever, but website has only 5 pages - all on first level nav). That’s what happens in Firefox browser.
In Chrome I get the following url: mysite.com/sitemap.xml/sitemap/SilverStripe-CMS-Model-SiteTree/1

Is there anything else I have to configure?

Thanks!

1 Like

Did you end up getting this working?

I’m having the same problem. I did have google sitemaps working, but now I’m also getting the white page. When I look at the generated file, it starts the document, but stops before it gets to the end so never has a closing tag. You can also see this in browser web inspector.

I thought it was an interaction with a module or config and have stepped through a new installation bit by bit to try and work out what’s causing the issue, to no avail.

It ended up being the Google Tag Manager module:

Hi elke_be,

Funny, I just added the wilr/silverstripe-googlesitemaps today to a SilverStripe 5.3 version and it all worked well.
I am sorry, unfortunately I can’t remember if and how I solved it back in 2021.

Have you used Firefox? I had lately issues with caching using Firefox. In Chrome it refreshed as expected.

Thanks. Got it solved. The patch release for the tag manager came out earlier today.

There might be a misconfiguration or a caching issue. Try running ?flush=1 after your domain to clear any cached configs. Also, check your .htaccess and ensure there are no redirects affecting /sitemap.xml. Furthermore, enable debugging to see if any errors are logged.