-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty sitemap if a taxonomy is removed #14981
Comments
This issue is currently awaiting triage from @ErisDS. We're having a busy time right now, but we'll update this issue ASAP. If you have any more information to help us triage faster please leave us some comments. Thank you for understanding 🙂 |
Hey there, thank you so much for the detailed bug report. That does look like something that shouldn't happen! A PR to fix this issue would be very welcome 🙂 |
@ErisDS I'm submitting a PR for this one however
I would think google reports an error because the file is not a valid xml, rather than because it has no entry. But I would guess other SEO tools might report at least a warning for an empty sitemap. Moreover I do not really see the point of generating an empty sitemap. |
Closes TryGhost#14981 - Taxonomy-specific sitemaps were invalid xml when there was no data - These invalid empty sitemaps were referenced in the index sitemap causing SEO tools to report errors
Closes TryGhost#14981 - Taxonomy-specific sitemaps were invalid xml when there was no data - These invalid empty sitemaps were referenced in the index sitemap causing SEO tools to report errors
closes: #14981 - Taxonomy-specific sitemaps were invalid xml when there was no data - These invalid empty sitemaps were referenced in the index sitemap causing SEO tools to report errors
closes: TryGhost#14981 - Taxonomy-specific sitemaps were invalid xml when there was no data - These invalid empty sitemaps were referenced in the index sitemap causing SEO tools to report errors
closes: #14981 - Taxonomy-specific sitemaps were invalid xml when there was no data - These invalid empty sitemaps were referenced in the index sitemap causing SEO tools to report errors
Issue Summary
By deleting a taxonomy from the
routes.yml
file, the deleted taxonomies pages are not generated, but their respective sitemap are. They are empty, but some tools like Google Search Console warn users that their sitemap is wrong because it's empty.Example of my website, where I've disabled the
authors
taxonomy.I tried to find a way to fix this in Ghost source code, but I couldn't run a working setup on my machine (I really should install Linux... 🙈).
However, I'll paste my notes I've took while looking into this bug, in the hope that it will at least help you.
core/frontend/services/sitemap/manager.js
core/frontend/services/sitemap/index-generator.js
Thanks to the Ghost team!
Steps to Reproduce
tags
orauthors
(https://ghost.org/docs/themes/routing/#removing-taxonomies)/sitemap.xml
Last Modified
date of1970-01-01 00:00
Ghost Version
5.2.3
Node.js Version
v16.15.0
How did you install Ghost?
Docker
Database type
MySQL 8
Browser & OS version
Google Chrome | Windows 10
Relevant log / error output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: