Issue Bug Closed

#103642Alternate hreflang x-default

Mark Weisgerber 04/16/24, 17:11 updated 11/27/25, 14:29

Description

The meta tag “x-default” can currently only be changed by manually adjusting the order in the language array of the sites.yaml file. It is not possible to change the order in the backend.
The good news is that by changing the order, the correct x-default value is actually used in the frontend. In my case languageId: 2

languages:
  - languageId: 2
    enabled: true
    title: Englisch
    websiteTitle: fellow.dog
    base: 'https://www.fellow.dog/'
    locale: en_US.utf8
    navigationTitle: English
    direction: ''
    fallbackType: strict
    fallbacks: ''
    flag: en-us-gb
    deeplTargetLanguage: EN-US
  - languageId: 0
    enabled: true
    title: Deutsch
    base: 'https://www.darf-ich-mit.de/'
    locale: de_DE.utf8
    navigationTitle: Deutsch
    direction: ''
    flag: de
    websiteTitle: ''
    deeplTargetLanguage: DE

But now to the problem. Due to the change, my languageId 0 (German) is hidden in the backend when I want to edit pages. (see screenshot)
I have come across the problem with the x-default several times now, both privately and professionally, and would very much like to be able to adjust the x-default value in the sites config

The use of the EXT:cs_seo extension offers this feature, but only halfway, because the URLs for RouteEnhancers are not resolved. Therefore their feature is unfortunately unusable

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.