Let's say a site has 100 pages in a default language, but only 60 of them are translated into a second language.
The Google XML Sitemap will add hreflang entries to the 40 non-translated items. All of them point to the home page of the second language (https://mysite.com/2ndlanguage/).
The correct behaviour would be to omit the hreflang entry in the sitemap item if there is no translation to a page.
How to reproduce
Add a new page in the default language, but don't translate it. Check the Google XML Sitemap entry of that page.
Possible Solution
Omit hreflang if there is no translation
Additional Context
No response
Validations
[X] Check that there isn't already an issue that reports the same bug
[X] Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
Module version(s) affected
7
Description
Let's say a site has 100 pages in a default language, but only 60 of them are translated into a second language.
The Google XML Sitemap will add hreflang entries to the 40 non-translated items. All of them point to the home page of the second language (https://mysite.com/2ndlanguage/).
The correct behaviour would be to omit the hreflang entry in the sitemap item if there is no translation to a page.
How to reproduce
Add a new page in the default language, but don't translate it. Check the Google XML Sitemap entry of that page.
Possible Solution
Omit hreflang if there is no translation
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)