#99064Languages in config.yaml should be order independent
Description
We have recently migrated our site from TYPO3 v10.4.31 to v11.5.18. Somehow there seems to be changes with the language management.
*The Problem:*
Using an earlier configured config.yaml (with TYPO3 version 9.5), the languages in the file are in the following order:
- German (languageId: 1)
- Italian (languageId: 2)
- Ladin (languageId: 4)
- English (languageId: 0, typo3Language: default)
The problem is illustrated in the picture ‘typo3v11-backend-wrong-language.png’: The backend shows German as the default language and the English language is missing despite being configured. German appears twice.
When I move the English language section to the beginning of the languages block, the problem is solved (See ‘correct-language-configuration.png’).
The correct parsing of the default language should not depend on the position it appears in the config.yaml.
Reviews 5
- main 97222[TASK] Require language 0 in site configurations
- 14.3 97280[BUGFIX] Show default language in tiles of the Sites overview
- main 97221[BUGFIX] Show default language in tiles of the Sites overview
- 14.3 97225[BUGFIX] Use language 0 as default language of a site
- main 97053[BUGFIX] Use language 0 as default language of a site
Related issues 4
Files 3
History 1219
-
Yannick Lieneweg changed attached config.yaml <span data-processor="relativetime" data-value="2022-11-11T14:55:44+00:00" > 11/11/22, 14:55 </span>
-
Eric Harrer changed Related to #101557 <span data-processor="relativetime" data-value="2023-08-03T21:48:32+00:00" > 08/03/23, 21:48 </span>
-
Georg Ringer changed Related to #107234 <span data-processor="relativetime" data-value="2025-08-08T14:52:12+00:00" > 08/08/25, 14:52 </span>
-
S P commented <span data-processor="relativetime" data-value="2025-10-24T09:24:59+00:00" > 10/24/25, 09:24 </span>
Can confirm. The FE (for example, like LanguageMenuProcessor) does correctly use the order in YAML. But the BE has problems if L=0 is not first. For example, the preview link takes the first YAML entry then. And the “All Languages” view does show the first entry (not L=0) as the first column – and (worse) it repeats the Non-0 column again (and does not show L=0 at all).
-
S P changed Duplicated by #107234 <span data-processor="relativetime" data-value="2025-10-24T09:29:45+00:00" > 10/24/25, 09:29 </span>
-
S P commented <span data-processor="relativetime" data-value="2025-10-24T09:43:11+00:00" > 10/24/25, 09:43 </span>
I think the problem is that
Site::getDefaultLanguage()doesreturn reset($this->languages);Instead it should do something like
return $this->getLanguageById(0);If I try this, it seems to fix many of the problems. But the order in the BE still seems to be the order of the YAML (and not ordered by
sys_language_uid).I’d naturally expected the BE to order by languge ID, and the FE to order by the “physical” order in YAML.
-
Gerrit Code Review pushed patch set 1 for main to change 97053 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-23T07:40:13+00:00" > 10/23/26, 07:40 </span> -
Gerrit Code Review pushed patch set 2 for main to change 97053 <span data-processor="relativetime" data-value="2026-10-23T12:49:23+00:00" > 10/23/26, 12:49 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 97053 <span data-processor="relativetime" data-value="2026-10-23T13:02:00+00:00" > 10/23/26, 13:02 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 97053 <span data-processor="relativetime" data-value="2026-10-23T14:28:05+00:00" > 10/23/26, 14:28 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 97053 <span data-processor="relativetime" data-value="2026-10-28T09:37:19+00:00" > 10/28/26, 09:37 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 97053 <span data-processor="relativetime" data-value="2026-10-29T22:06:49+00:00" > 10/29/26, 22:06 </span>
-
Oliver Bartsch changed Related to #111284 <span data-processor="relativetime" data-value="2026-10-29T22:25:53+00:00" > 10/29/26, 22:25 </span>
-
Oliver Bartsch changed Related to #111285 <span data-processor="relativetime" data-value="2026-10-29T22:31:11+00:00" > 10/29/26, 22:31 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97225 <span data-processor="relativetime" data-value="2026-10-30T07:07:28+00:00" > 10/30/26, 07:07 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-30T07:10:15+00:00" > 10/30/26, 07:10 </span>Applied in changeset commit:cdaa725d2d8add6da57e37f269094e8a222973d7.
-
Benni Mack changed Related to #90031 <span data-processor="relativetime" data-value="2026-11-06T12:32:53+00:00" > 11/06/26, 12:32 </span>
I can confirm this behavior in TYPO3 11. Apparently the default language must always be in first place. This is probably due to the fact that the default language has a special status as a structure-giving language and is always located in the first column of the backend interface of the page module. When a site configuration is newly created via the backend interface, it is ensured that the default language is in the first position. This is not the case if the site configuration was created in another way. At least when saving via the backend interface, the default should be automatically pushed back to the first position. But in the end the languages need some order for the output in the backend.