#94207Hreflang / Language Menu have a wrong fallback to the default language
Description
I have the following setup like in the core seo hreflang tests.
rootPageId: 1
base: http://localhost/
languages:
- title: English
enabled: true
languageId: 0
base: /
typo3Language: default
locale: en_US.UTF8
iso-639-1: en
navigationTitle: English
hreflang: en-US
direction: ltr
flag: en-us-gb
websiteTitle: ''
- title: German
enabled: true
base: /de/
typo3Language: de
locale: de_DE.UTF8
iso-639-1: de
websiteTitle: ''
navigationTitle: Deutsch
hreflang: de-DE
direction: ltr
fallbackType: strict
fallbacks: ''
flag: de
languageId: 1
- title: 'Swiss German'
enabled: true
base: /de-ch/
typo3Language: de
locale: de_CH.UTF8
iso-639-1: de
websiteTitle: ''
navigationTitle: Schweiz
hreflang: de-CH
direction: ltr
fallbackType: fallback
fallbacks: '1'
flag: ch
languageId: 2
So the language 2 points only to language 1 as fallback, not to the default language. When there is no translation given, I can not call the url /de-ch/ without an error. But in the language menu and hreflang this version is specified. Correct would be:
1. If there is no translation, don’t show any hreflang.
2. Specify the hreflang for language 2, if there is a translated record in lanuage 1 or language 2.
Reviews 1
History 4
-
Riny van Tiggelen commented <span data-processor="relativetime" data-value="2021-09-08T11:28:44+00:00" > 09/08/21, 11:28 </span>
-
Riny van Tiggelen changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2021-09-08T11:29:18+00:00" > 09/08/21, 11:29 </span> -
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2021-12-30T09:33:02+00:00" > 12/30/21, 09:33 </span>
https://review.typo3.org/c/Packages/TYPO3.CMS/+/69919 has been merged AFAICS
Is this issue still relevant?
-
Benni Mack commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-11-06T08:45:47+00:00" > 11/06/26, 08:45 </span>This has been fixed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/69919 and follow-ups. On current versions, a language whose fallback chain does not include the default language is only marked as available in the language menu, and only gets an hreflang tag, if the page (or a page in its fallback chain) is translated. HrefLangGeneratorTest covers exactly this setup (de-CH falling back to de). Closing — please reopen if you can still reproduce this on 13.4 or 14.
Could you try if this fixes your issue (or at least the first)?
https://review.typo3.org/c/Packages/TYPO3.CMS/+/69919