94798[BUGFIX] Persist nullable selectSingle changes between NULL and 0
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 3
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/98/94798/3 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/98/94798/3 && git cherry-pick FETCH_HEAD
Review
-
Code review CR +1 Needs a vote
- Oliver Klee +1
-
Verified V +1 Needs a vote
- Oliver Klee +1
- core-ci +1 CI
Relation chain 2
-
main
94801[BUGFIX] Prevent multiple identifier quoting in new Extbase QoM methods
The chain has patch set 2 of 3, the changes above it need a rebase.
-
94798 [BUGFIX] Persist nullable selectSingle changes between NULL and 0 This change
Issues 2
Files 5
- typo3/sysext/core/Classes/Schema/Field/StaticSelectFieldType.php+4 −4
- typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/SelectSingleNullableTest.phpnew+86 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler_select/Configuration/TCA/tx_testdatahandlerselect_domain_model_record.phpnew+42 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler_select/composer.jsonnew+18 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler_select/ext_tables.sqlnew+3 −0
Review log 912
-
Garvin Hicking uploaded patch set 1 07/16/26, 10:45
-
Garvin Hicking updated the commit message in patch set 2 07/16/26, 10:47
-
core-ci voted on patch set 1 V +1 07/16/26, 10:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104829
-
core-ci voted on patch set 2 V +1 07/16/26, 10:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104830
-
Josua Vogel voted on patch set 2 CR +1 09/03/26, 05:42
-
Garvin Hicking updated the commit message in patch set 3
CR +1V +109/03/26, 06:11 -
Garvin Hicking commented on patch set 3 09/03/26, 06:12
-
core-ci voted on patch set 3 V +1 09/03/26, 06:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107719
-
Oliver Klee voted on patch set 3 V +1 09/03/26, 06:50
-
Oliver Klee voted on patch set 3 CR +1 09/03/26, 06:50
-
Daniel Windloff commented on patch set 3 09/03/26, 07:58
Hey, some remarks: - The implementation is missing the FormEngine component for strings—specifically (items with string values are allowed). A quick test shows that this isn't handled in the configuration. From the perspective of FormEngine and DataHandler, the functionality therefore remains incomplete. Use this configuration for example: 'select_single_nullable_string' => [ 'exclude' => false, 'label' => 'select single nullable', 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'minitems' => 1, 'maxitems' => 1, 'nullable' => true, 'default' => null, 'items' => [ ['label' => 'null', 'value' => null], ['label' => 'Regular empty string', 'value' => ''], ['label' => 'Member', 'value' => 'value1'], ['label' => 'Special', 'value' => 'value2'], ], ], ], - I find implementing this for only a subset of the `select` type problematic, as it creates the expectation that it will work for all `select` configurations. In my point of view, a cleaner approach would be a new TCA config type like `selectFromList` that selects exclusively from an `items` list containing `int|null` values and supports null. With the current version, it is difficult to document when it works and when not. - To me, this isn't a bugfix. It is a feature. Nullable option hasn't been implemented for the `select` type as far as I know. -
Garvin Hicking commented on patch set 3 09/03/26, 08:05
Reply Unresolved
Hey Daniel, thanks a lot, that is very good input. I'll need to chew on it. I wouldn't like adding a new TCA type for it though, so "fixing" it in every type=select case would be better for integrators. You're probably right on declaring it a missing feature, which would rule out the backport(s).
Unresolved