94788[FEATURE] Allow limiting content elements per colPos
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/88/94788/6 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/88/94788/6 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Merge conflicts 26
- main 95431[TASK] Make most of the backend TypeScript null-safe
- main 94552[WIP][FEATURE] Passwordless passkey login for the backend
- main 95099[BUGFIX] Prevent exception if translated page doktype mismatches parent
- main 95475[WIP][FEATURE] Show all-language content in language comparison
- main 95435[WIP][TASK] Enable strictNullChecks for the TypeScript build
- main 97436[!!!][FEATURE] Link content elements as records
- main 93819[WIP][BUGFIX] Guard translated tt_content free-mode moves
- main 88374[TASK] Remove flags from module "Layout"
- main 93628[WIP][TASK] Make GD the baseline image processor
- main 94753[FEATURE] New TCA type "coordinate"
- main 95105[TASK] Apply PHP code simplifications
- main 96543[WIP][POC][TASK] Write and read records by the same rules and rights
- main 96997[BUGFIX] Update new content link after element move
- main 93597[WIP] Dispatch fields
- main 95145[TASK] Migrate LanguageService->sL() labels to new domain syntax
- main 82287[FEATURE] Introduce preview rendering for plugins
- main 90848[FEATURE] Add thumbnail to new record wizard
- main 95453[WIP][TASK] Use ajax to load the delete message
- main 94653[WIP] Record Identity
- main 92384[POC] Allow sites to define what content elements are provided
- main 91936[POC][FEATURE] Extbase Route Annotations
- main 93528[WIP][TASK] Add new ce wrapper to contain element behavior
- main 91178[!!!][FEATURE] Autoconfigure backend login providers
- main 88643[TASK] Hide all add-content-buttons on drag and drop
- main 76792[WIP][TASK] Move view switch in page module
- main 68199[WIP][TASK] Add <typo3-backend-module> element
Issues 1
Files 27
- Build/Sources/TypeScript/backend/layout-module/column-restriction.ts+11 −2
- Build/Sources/TypeScript/backend/layout-module/drag-drop.ts+12 −2
- Build/Sources/TypeScript/backend/layout-module/paste.ts+7 −1
- typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php+35 −1
- typo3/sysext/backend/Classes/Hooks/DataHandlerColumnMaxItemsHook.php10new+900 −0
- typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumn.php+66 −0
- typo3/sysext/backend/Classes/View/BackendLayout/ColumnMaxItemsRestriction.phpnew+232 −0
- typo3/sysext/backend/Resources/Private/Language/locallang_layout.xlf+6 −0
- typo3/sysext/backend/Resources/Private/Partials/PageLayout/Grid/Column.fluid.html+2 −1
- typo3/sysext/backend/Resources/Private/Partials/PageLayout/Grid/ColumnHeader.fluid.html+16 −1
- typo3/sysext/backend/Resources/Private/Partials/PageLayout/Record.fluid.html+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/layout-module/column-restriction.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/layout-module/drag-drop.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/layout-module/paste.js+1 −1
- typo3/sysext/backend/Tests/Functional/Fixtures/Extensions/test_backend_layout_max_items/Configuration/page.tsconfignew+86 −0
- typo3/sysext/backend/Tests/Functional/Fixtures/Extensions/test_backend_layout_max_items/composer.jsonnew+18 −0
- typo3/sysext/backend/Tests/Functional/Hooks/Fixtures/ColumnMaxItems.csvnew+52 −0
- typo3/sysext/backend/Tests/Functional/Hooks/Fixtures/ColumnMaxItemsEditor.csvnew+10 −0
- typo3/sysext/backend/Tests/Functional/Hooks/Fixtures/ColumnMaxItemsWorkspace.csvnew+3 −0
- typo3/sysext/backend/Tests/Functional/Hooks/DataHandlerColumnMaxItemsHookTest.phpnew+1063 −0
Show 7 more files
- typo3/sysext/backend/Tests/Unit/View/BackendLayout/ColumnMaxItemsRestrictionTest.phpnew+72 −0
- typo3/sysext/backend/ext_localconf.php+3 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-110651-AllowLimitingContentElementsPerColPos.rstnew+130 −0
- typo3/sysext/styleguide/Classes/TcaDataGenerator/GeneratorFrontend.php+24 −0
- typo3/sysext/styleguide/Configuration/Sets/Styleguide/page.tsconfig+32 −0
- typo3/sysext/styleguide/Resources/Private/Language/locallang.xlf+12 −0
- typo3/sysext/styleguide/Resources/Private/Templates/Pages/StyleguideColumnMaxItems.fluid.htmlnew+11 −0
Review log 1622
-
Josua Vogel uploaded patch set 1 07/15/26, 10:06
-
core-ci voted on patch set 1 V +1 07/15/26, 10:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104783
-
Stefan Bürk commented on patch set 1 07/15/26, 15:09
I guess that needs workspace aware thoughts and handlings ? Item deleted and another added in the workspace. And also dealing during workspace pulish in case another workspace has been published or in live workspace the limit reached - how should workspace deal with that case ? TBH not tested or looked into it, just wanted to mention custom thoughts in a early phase of it. -
Josua Vogel commented on patch set 1 07/15/26, 15:15
Reply
Thanks for your thoughts! It´s a PoC, because I want this for a customer 😊 But I´ll have a look at the workspace handling soon -
Josua Vogel uploaded patch set 2
V +109/08/26, 11:26 -
core-ci voted on patch set 2 V +1 09/08/26, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108085
-
Josua Vogel uploaded patch set 3
V +109/08/26, 11:45 -
core-ci voted on patch set 3 V +1 09/08/26, 11:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108089
-
Lukas Dörr commented on patch set 3 CR +1 V +1 09/11/26, 11:03
works great. I think this should be in core :) well done! -
Josua Vogel commented on patch set 3 09/11/26, 15:10
Reply
Acknowledged -
Daniel Windloff commented on patch set 3 09/14/26, 06:10
DataHandlerColumnMaxItemsHook.php:38In my point of view, the restriction cannot be sensibly encapsulated in a hook. I would integrate it directly into the DH, even though that is already significantly too large.DataHandlerColumnMaxItemsHook.php:71Default values are not fully resolved yet. This will not work properly. I had the same issue while refactoring the other colpos related hook: https://review.typo3.org/c/Packages/TYPO3.CMS/+/90484DataHandlerColumnMaxItemsHook.php:80Pid can be a NEW placeholder. It will be resolved later. So if the pid is a string, it the dataMap could be checked for other entries with the same pid.DataHandlerColumnMaxItemsHook.php:410All as lang should be considered as well -
Josua Vogel uploaded patch set 4
CR +1V +110/22/26, 19:13 -
Josua Vogel commented on patch set 4 10/22/26, 19:16
DataHandlerColumnMaxItemsHook.php:38ReplyI kept it as a hook on purpose: the existing column restriction is implemented the same way in DataHandlerContentElementRestrictionHook. Both restrictions belong to backend layouts, so I think it´s a good match inside ext:backend.DataHandlerColumnMaxItemsHook.php:71ReplyDone – the change now sits on top of #90484 and resolves the defaults of new records with DefaultValuesResolver.DataHandlerColumnMaxItemsHook.php:80ReplyDone – new records are checked in processDatamap_preProcessFieldArray, where NEW pids are resolved via substNEWwithIDs.DataHandlerColumnMaxItemsHook.php:410ReplyDone – counting is now per column and language; an 'All languages' element counts against every language and needs room in the fullest one. -
core-ci voted on patch set 4 V +1 10/22/26, 19:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112177
-
Benni Mack commented on patch set 4 10/23/26, 14:18
DataHandlerColumnMaxItemsHook.php:38ReplyI would like to keep as much of "tt_content" out of EXT:core if possible -
Josua Vogel commented on patch set 4 10/25/26, 19:35
DataHandlerColumnMaxItemsHook.php:38ReplyAcknowledged -
Oli Bartsch commented on patch set 4 10/25/26, 22:22
I think we need to talk about this. Editors usually add multiple elements and manage visibility via enable fields (hidden/starttime/endtime). This in my opinion is quite a common and valid use case, which should not be blocked by this. -
Oli Bartsch uploaded patch set 5
V +111/11/26, 21:04 -
core-ci voted on patch set 5 V -1 11/11/26, 21:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114145
-
Josua Vogel uploaded patch set 6
V -111/15/26, 18:53 -
core-ci voted on patch set 6 V +1 11/15/26, 18:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114558
-
Josua Vogel commented on patch set 6 11/16/26, 14:59
Reply
We discussed this on Slack and agreed that “hidden” doesn't count and that starttime and endtime should be included.