79266[FEATURE] Add DefaultLanguageRestriction
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 6
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/66/79266/6 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/66/79266/6 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Issues 1
Files 3
Review log 1723
-
Stefan Froemken uploaded patch set 1 06/12/23, 19:35
-
core-ci voted on patch set 1 V -1 06/12/23, 19:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42400
-
Stefan Froemken uploaded patch set 2
V -106/12/23, 19:45 -
core-ci voted on patch set 2 V -1 06/12/23, 19:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42401
-
Stefan Froemken uploaded patch set 3
V -106/12/23, 20:03 -
core-ci voted on patch set 3 V +1 06/12/23, 20:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42402
-
Stefan Bürk commented on patch set 3 06/12/23, 21:44
Feature is main only. No backports. TBH not reviewed yet. -
Stefan Bürk voted on patch set 3 CR -1 06/12/23, 21:45
-
Anja Leichsenring commented on patch set 3 06/13/23, 04:44
I don't get the restriction. Default language is always 0, so why do you ask for '>= 0' ? And 'l10nParent' might be zero anyway, think free mode. That will it not make a default language record. Some more information about how you ended up with the restrictions you built would be helpful to verify. -
Stefan Froemken commented on patch set 3 06/13/23, 05:38
Reply
Hi Anja, I ask for <= 0. Also records with -1 are part of records in default language. I have used official TYPO3 API to get records in default language: https://github.com/TYPO3/typo3/blob/11.5/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php#L2511-L2524 -
André Buchmann commented on patch set 3 CR -1 05/25/24, 06:30
Unresolved
I've implemented almost the same DefaultLanguageRestriction in my Patch here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84338 Thx to Gerrit for showing the Conflict :-) --- I think we shouldn't use the hardcoded 0 as default language, but fetch it from the site configuration. This way this patch can be a prepatch for my patch. -
Stefan Froemken updated the commit message in patch set 4
CR -1V +106/23/24, 14:09 -
Stefan Froemken rebased onto patch set 5 06/23/24, 14:10
-
core-ci voted on patch set 5 V -1 06/23/24, 14:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60109
-
Stefan Froemken uploaded patch set 6
V -106/23/24, 14:24 -
core-ci voted on patch set 6 V +1 06/23/24, 14:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60112
-
Georg Ringer commented on patch set 6 06/23/24, 14:38
so what about the famous & ugly -1 language? -
Stefan Froemken commented on patch set 6 06/23/24, 15:27
Reply
I keep it in sync with extbase queries. If it will be changed there, I'm ready to update it here, too. -
core-ci voted on patch set 4 V -1 06/23/24, 18:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60108
-
Anja Leichsenring wrote 07/31/24, 18:16
Removed cc Anja Leichsenring. -
Benni Mack commented on patch set 6 03/27/25, 17:34
I'd very much be in favor of actually using the LanguageAspect for constructing the query - but I still do not get the need for it (like... the actual use cases). I don't know: a) if you are in Frontend Context, Extbase + PageRepository do the job for you b) if you are in Backend, I am not sure when you "only" want the default language records (but not ALL languages?)Reply
which Extbase Queries?DefaultLanguageRestriction.php:41Unresolved1. Using isTableLocalizable() should be avoided. You are adding a (yet another) explicit dependency from EXT:backend to EXT:core by using this code. -
Benni Mack marked it work in progress 03/27/25, 17:34
-
Benni Mack commented on patch set 6 03/31/25, 18:55
Also see https://forge.typo3.org/issues/91247 "FrontendLanguageRestriction"