96653[!!!][TASK] Restrict TCA overrides for types and special values
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 7
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/53/96653/7 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/53/96653/7 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V -1 Blocked
- core-ci -1 CI
Merge conflicts 38
- main 97304[WIP][BUGFIX] Render the record form from unsaved values
- main 94552[WIP][FEATURE] Passwordless passkey login for the backend
- main 97560[TASK] Find subpages with one query when copying and deleting pages
- main 97603[TASK] Introduce RecordTypeResolver and deprecate getTCAtypeValue()
- main 93819[WIP][BUGFIX] Guard translated tt_content free-mode moves
- main 70768[FEATURE] Configure muted, loop and controls per video file reference
- main 95929[BUGFIX] Language field must not be an exclude field
- 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 96741[FEATURE] Add preview images for videos
- main 74781[FEATURE] Introduce new slug builders for records and string
- main 96829[!!!][BUGFIX] Restore deleted records by their deletion operation
- main 92859[WIP][BUGFIX] Make MM tables language-aware and workspace-aware
- main 96344[BUGFIX] Keep live and foreign MM rows when creating a version
- main 95145[TASK] Migrate LanguageService->sL() labels to new domain syntax
- main 95343[FEATURE] Add `adminOnly` for TCA columns
- main 95638[TASK] Extend FieldValidationService to more TCA field types
- main 95639[TASK] Extract a read-only UniquenessChecker from DataHandler
- main 95637[TASK] Introduce FieldValidationService for TCA field validation
- main 95194[WIP][!!!][TASK] Remove the array shaped schema migrator API
- main 94721[WIP][TASK] Split ExtensionScannerScanFileAction from UpgradeController
- main 92471[POC] Page Layout Views
- main 90049[FEATURE] Enhance slug generation for folders and spacers
- main 91423[WIP][TASK] Move config values to both section columns and config
- main 92847[WIP][FEATURE] Allow simplified TCA configuration
- main 92851[WIP][FEATURE] Allow simplified TCA configuration (Test II)
- main 69092[WIP][TASK] Implement install tool layout boilerplate as web components
- main 66214[FEATURE] Allow text-track files for videos
- main 93407[TASK] Modernize `RecordHistoryStore`
- main 68148[FEATURE] Add video platform name to iframe title
- main 92214[TASK] Introduce generic permission sets for accessing data
- main 91276[WIP][FEATURE] Switch to list module if page module is on a folder
- main 85574[WIP][FEATURE] Language-aware slugs and slug normalizer API
- main 87687[WIP][TASK] Drop ext_conf_template with "LocalConfiguration" synchronisation
- main 87719[WIP][BUGFIX] Mitigate missing column in cached schema information
- main 80074[WIP][!!!][TASK] Improve defaults for translating content
- main 82154[WIP][FEATURE] Simplify Extbase plugin configuration and registration
Issues 1
Files 32
- typo3/sysext/core/Classes/Configuration/Tca/TcaFactory.php+36 −1
- typo3/sysext/core/Classes/Configuration/Tca/TcaRemoveConfigTypeOverridesAndKeepFixedValues.phpnew+237 −0
- typo3/sysext/core/Classes/Configuration/Tca/TcaRemoveOverridesProcessingResult.phpnew+67 −0
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+1 −2
- typo3/sysext/core/Classes/DataHandling/SlugHelper.php+1 −6
- typo3/sysext/core/Classes/Hooks/PagesTsConfigGuard.phpdeleted+0 −38
- typo3/sysext/core/Configuration/TCA/Overrides/sys_file_metadata.php+0 −9
- typo3/sysext/core/Configuration/TCA/Overrides/sys_file_reference.php+0 −9
- typo3/sysext/core/Configuration/TCA/be_users.php+1 −0
- typo3/sysext/core/Configuration/TCA/pages.php+1 −0
- typo3/sysext/core/Configuration/TCA/sys_file_metadata.php+12 −0
- typo3/sysext/core/Configuration/TCA/sys_file_reference.php+12 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-111034-TCARemoveFieldTypesConfigTypeFromAnyOverrides.rstnew+162 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_event/Configuration/TCA/Overrides/fruit.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_event/Configuration/TCA/fruit.php+1 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_not_override/Configuration/TCA/Overrides/be_users.phpnew+8 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_not_override/Configuration/TCA/Overrides/fe_users.phpnew+5 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_not_override/Configuration/TCA/Overrides/pages.phpnew+6 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_not_override/Configuration/TCA/Overrides/tx_test_element.phpnew+3 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_not_override/Configuration/TCA/tx_test_element.phpnew+96 −0
Show 12 more files
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_tca_not_override/composer.jsonnew+18 −0
- typo3/sysext/core/Tests/Functional/Tca/BeforeTcaOverridesEventTest.php+1 −1
- typo3/sysext/core/Tests/Functional/Tca/TcaRemoveConfigTypeOverridesAndKeepFixedValuesTest.phpnew+110 −0
- typo3/sysext/core/Tests/Unit/Configuration/Tca/TcaRemoveConfigTypeOverridesAndKeepFixedValuesTest.phpnew+315 −0
- typo3/sysext/core/ext_localconf.php+0 −2
- typo3/sysext/frontend/Configuration/TCA/fe_users.php+1 −0
- typo3/sysext/install/Classes/Controller/UpgradeController.php+21 −0
- typo3/sysext/scheduler/Configuration/TCA/Overrides/scheduler_ip_anonymization_task.php+0 −2
- typo3/sysext/scheduler/Configuration/TCA/Overrides/scheduler_optimize_database_table_task.php+0 −1
- typo3/sysext/scheduler/Configuration/TCA/Overrides/scheduler_recycler_garbage_collection_task.php+0 −1
- typo3/sysext/scheduler/Configuration/TCA/Overrides/scheduler_table_garbage_collection_task.php+0 −2
- typo3/sysext/styleguide/Configuration/TCA/tx_styleguide_file.php+0 −1
Review log 1219
-
Daniel Windloff uploaded patch set 1 10/13/26, 04:10
-
core-ci voted on patch set 1 V -1 10/13/26, 04:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110961
-
Daniel Windloff uploaded patch set 2
V -110/13/26, 05:10 -
core-ci voted on patch set 2 V +1 10/13/26, 05:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110970
-
Daniel Windloff uploaded patch set 3
V +110/16/26, 04:48 -
core-ci voted on patch set 3 V -1 10/16/26, 04:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111309
-
Daniel Windloff rebased onto patch set 4
V -110/16/26, 11:27 -
core-ci voted on patch set 4 V +1 10/16/26, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111351
-
Daniel Windloff rebased onto patch set 5
V +110/23/26, 15:17 -
core-ci voted on patch set 5 V -1 10/23/26, 16:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112342
-
Daniel Windloff rebased onto patch set 6
V -110/24/26, 02:50 -
core-ci voted on patch set 6 V +1 10/24/26, 03:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112377
-
Garvin Hicking commented on patch set 6 10/24/26, 08:02
I think there are scenarios that result in DB schema changes which we should block (like turning selects into inputs). But there are several changes I see useful for integrators to fit rules, and which I do see commonly used in projects: - turn text to input - turn input to text - turn text to select (for restricted presets) - turn anything into passthrough Since you can "own" a type change with ext_tables.sql thats also interesting for overriding third party code with your own intent. -
Daniel Windloff commented on patch set 6 10/24/26, 10:12
Reply
I would not question that there are several valid use cases for overriding a `type`. The approach here is from a different perspective: For the refactoring of the `DataHandler`, specifically to eliminate core hooks or to integrate hard-coded logic (such as page permissions, language diff sources, etc. ) into the standard `process_datamap` workflow, we need a clear definition of when TCA overrides are permissible (an which kind) and when they are not. Many modifications that are currently allowed would simply lead to errors. For instance, changing the recordtype of `tt_content` to `input` might be technically feasible at the database level, but it would fail elsewhere. The same applies to almost all management fields and likely to fields like `password`, `slug`, etc.—which should not be redefined as `input`. In my view, allowing or prohibiting changes at the type level is also problematic, as it cannot represent the relationships between columns. The current restriction was an attempt to establish a rule, admittedly imperfect, but easy to follow, for this purpose. I have outlined an earlier idea with the same goal here: https://forge.typo3.org/issues/110720 . In my view, the system cannot function without a reasonable, established baseline for configuration. Hardcode this in DataHandler hooks only leads to inconsistent behavior between different parts of the core like FormEngine, DefaultSchema or Extbase. That is why I suggest changing TCA directly early. This does not necessarily mean that the proposal presented here is the only way to achieve that. The current configuration overrides allows anything — including the possibility of breaking the system. I don't think that should work ;) -
Garvin Hicking commented on patch set 6 10/24/26, 12:12
Reply
Short on time atm, but: could we recommend to use a different rendertype? Eg keep base type and adjust the display from input=>text and vice versa? We'd "just" need to ensure that rendertypes are interchangeable for every type? At least for my use cases that could work (haven't tried) and we might have smaller "annoyance impact" from others. Usually I think people just want to change display/represantion but not persistence....? -
Daniel Windloff commented on patch set 6 10/24/26, 18:53
Reply Unresolved
Exactly. Strictly speaking, as far as I’m aware, `renderTypes` were actually introduced for this very reason - adding different representation of the same value. Changing input to text could be still difficult, as the persistance ins't the same (e.g. rte transformations for example). -
Daniel Windloff uploaded patch set 7
V +110/26/26, 04:17 -
Daniel Windloff wrote 10/26/26, 04:18
Topic set to DataHandler -
core-ci voted on patch set 7 V -1 10/26/26, 04:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112554