#89871HrefLangGenerator: Wrong links generated with page translations that use a shortcut
Description
Steps to reproduce:
- Create a site config with the languages “Default”, “German”, “Spanish“
- Create a page “Page A” and translate it to all languages
- Create a page “Page B” and translate it to all languages
- On “Page A”, make the german translation to a “Shortcut” to “Page B“
- Now open the spanish version of “Page A”.
Expected:
- The hreflang for “de” looks like https://www.sitename.com/de/page-b
Actual:
- The hreflang for “de” now looks like https://www.sitename.com/es/page-b
- This will also easily result in a 404 error, if the page title is different in the translation.
The HreflangGenerator incorrectly uses the language parameter of the current language instead of the one of the target language, if shortcuts are used.
Reviews 4
Related issues 5
- Bug #19114sys_language_mode content_fallback with a defined fallback chain does not output expected fallback content
- Bug #81657TSFE->page contains default language page when content_fallback; 1,0 is used
- Bug #86595No Language Fallback
- Bug #94677Menu-item of type "shortcut" is language-overlayed twice
- Task #95966Wrong tests for #89871