Skip to content
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

hreflang in Google Sitemap XML if no translation exists #871

Open
2 tasks done
BrandSven opened this issue Aug 7, 2024 · 0 comments
Open
2 tasks done

hreflang in Google Sitemap XML if no translation exists #871

BrandSven opened this issue Aug 7, 2024 · 0 comments

Comments

@BrandSven
Copy link

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

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant