#103520Empty hreflang field in siteconfig yaml
Description
Following languages key for config.yaml
-
title: Deutsch
enabled: true
languageId: 0
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: de
websiteTitle: ''
solr_core_read: core_de
-
title: English
enabled: true
base: /en/
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
websiteTitle: ''
navigationTitle: ''
hreflang: ''
direction: ''
fallbackType: fallback
fallbacks: '0'
flag: en-us-gb
languageId: 1
solr_core_read: core_en
In the confguration you see the problem, the hreflang field is empty for english language, so no hreflang tags are generated because only 1 language in with a hreflang field.
The problem behind this is, the missing hreflang entry is shown with a correctly filled placeholder value ‘en-US’ in the backend of the site configuration. So the configuration error is very hard to spot using only the typo3 backend.
My expectation would be, that if there is a placeholder value, this placeholder value would be used if the field is empty.
What i dont know is if this behaviour still exists on the current version.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 4
-
Georg Ringer commented and changed status
NewAccepted Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2024-06-14T11:02:35+00:00" > 06/14/24, 11:02 </span> -
Georg Ringer changed Sprint Focus
On Location Sprint<span data-processor="relativetime" data-value="2026-08-06T15:49:29+00:00" > 08/06/26, 15:49 </span> -
Benni Mack commented and changed status
AcceptedClosed <span data-processor="relativetime" data-value="2026-11-09T10:10:03+00:00" > 11/09/26, 10:10 </span>Since TYPO3 v12 (#99908) an empty hreflang falls back to the locale of the site language: SiteLanguage::getHreflang() returns en-US for locale: en_US.UTF-8, and EXT:seo renders the hreflang tags with that value. The field description in the site module says this as well. The reported situation (no hreflang tags because the field is empty) no longer occurs on supported versions. Closing as resolved.
-
Benni Mack changed Related to #99908 <span data-processor="relativetime" data-value="2026-11-09T10:10:10+00:00" > 11/09/26, 10:10 </span>
the placeholder is just a placeholder, not a fallback.
we are discussing what would be the best way: either making the field required or also doing some checks and place the result in reports or site module