84338[WIP][FEATURE] Make default language uid configurable
Commit message
Review
-
Code review CR 0
-
Verified V 0
- core-ci +1 CI
Issues 1
Files 17
- typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php+13 −4
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php+8 −6
- typo3/sysext/backend/Classes/Controller/RecordListController.php+3 −1
- typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php+3 −1
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseDefaultLanguagePageRow.php+1 −0
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseEffectivePid.php+1 −0
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseSystemLanguageRows.php+2 −1
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSiteLanguage.php+6 −3
- typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php+5 −10
- typo3/sysext/backend/Classes/View/PageLayoutContext.php+10 −5
- typo3/sysext/core/Classes/Database/Query/Restriction/DefaultLanguageRestriction.php1new+76 −0
- typo3/sysext/core/Classes/DataHandling/SlugHelper.php+14 −12
- typo3/sysext/core/Classes/Routing/PageRouter.php+2 −2
- typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php+13 −1
- typo3/sysext/frontend/Classes/Category/Collection/CategoryCollection.php+1 −0
- typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php+1 −0
- typo3/sysext/seo/Classes/HrefLang/HrefLangGenerator.php+1 −1
Review log 1319
-
André Buchmann uploaded patch set 1 05/22/24, 02:31
-
core-ci voted on patch set 1 V -1 05/22/24, 02:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58015
-
André Buchmann uploaded patch set 2
V -105/22/24, 03:36 -
core-ci voted on patch set 2 V -1 05/22/24, 03:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58018
-
André Buchmann uploaded patch set 3
V -105/22/24, 10:52 -
core-ci voted on patch set 3 V +1 05/22/24, 10:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58046
-
André Buchmann uploaded patch set 4
V +105/22/24, 12:59 -
core-ci voted on patch set 4 V -1 05/22/24, 13:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58054
-
André Buchmann uploaded patch set 5
V -105/24/24, 20:42 -
core-ci voted on patch set 5 V -1 05/24/24, 20:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58171
-
André Buchmann uploaded patch set 6
V -105/24/24, 22:32 -
core-ci voted on patch set 6 V +1 05/24/24, 22:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58173
-
André Buchmann commented on patch set 6 05/27/24, 07:04
-
Mathias Brodala commented on patch set 6 05/31/24, 07:07
Do I get it right that this would be basically a giant change? Everything in the TYPO3 world and the kitchen sink assumes that sys_language_uid=0 is the default language. If this is not true anymore, we have a long migration path which will likely span several years. I'm not sure it is worth the effort. Or do I get this totally wrong? -
André Buchmann commented on patch set 6 05/31/24, 12:46
Reply Unresolved
Yes, this is going to be a very big change. This is in the direction to an improved language handling, the Translation Handling Initiative wants to achieve. We totally think this is worth the effort and a long awaited feature. We try to implement it non-breaking: Zero is still used as the default value for new instances, root pages etc. So normal Setup won't note any difference! A dev needs to manually change the default language in the site config and DB to have a non-zero default-language Site. Of course third party extension need to be adapted if a non-zero default language is used, but it opens up a lot more possibilites for power users with multi site setups. See example from University of Copenhagen in the linked issue. We'll see how that works out, hopefully we can keep all core tests green :-) -
Benni Mack commented on patch set 6 06/01/24, 21:26
Unresolved
This patch seems a good starting point, but I can tell you already, that this is a rabbit hole that will have 1000s of side-effects. a) how to deal with pages.l18n_cfg now? The current state is under-documented, but IMHO well tested. in my opinion this feature is and was b) we use "0" for pages as default language. This now also means that we need to consider the behaviour of the "pid" for records, as they always reside on the pid of the "0" page ID. This needs to be defined, documented and tested, if changed. c) linking to pages to "0" pages or e.g. content elements on the default language also needs to be considered, documented and tested. d) my "favorite" topic relates to sorting - and this I believe needs to be sorted out first and ... especially separately. First: sorting of pages: If the default langauge is not "0" anymore, DataHandler logic for sorting pages needs to be adapted. I don't have any clue for a good solution here yet (and that I mean: For years I have been wrapping my brain around this). Maybe oliver hader has one. Second: Sorting of content elements in the page module is reflected by the default language. Sorting in the list module of records that are "translatable" - how should that behave then? e) of course... copying records from one site to another site, currently "half-baked" solution, will get even messier. -
Tymoteusz Motylewski commented on patch set 6 06/04/24, 19:55
Unresolved
2 questions - what if we keep 0 as id for default languega in given site, but allow it to be different language code (en-us, de-de) in different trees - i remember some discusions around default language and the idea back then was to use language code instead of integer. was this considered? -
André Buchmann marked it work in progress 03/25/25, 21:53
-
André Buchmann abandoned the change 10/23/26, 15:23
Removing the 0 value for the default language is currently nearly impossible. There are a lot of integer comparisons like x > 0 to fetch translations only, etc. I think keeping the 0 as the structure layer is way better for migration of existing projects. See PoC: https://github.com/t3thi/structure-layer
DefaultLanguageRestriction.php:59Unresolved