#94158Select type selectSingle fields (and likely other renderTypes too) do not support eval=null
Description
Example TCA:
'field' => [
'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xlf:table.field',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_foo',
'eval' => 'null',
],
],
Expectation:
Field should render with the “Set value” checkbox identical to how eval=null works on for example simple input fields.
Current behavior:
Option eval=null is ignored and does not render a “Set value” checkbox above the field.
References:
Similarly reported for RTE fields on https://forge.typo3.org/issues/88480
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] Select type selectSingle fields (and likely other renderTypes too) do not support eval=null Resolves: #94158 Releases: main
Related issues 1
History 3
-
Simon Schaufelberger changed Related to #88480 <span data-processor="relativetime" data-value="2021-06-24T08:30:41+00:00" > 06/24/21, 08:30 </span>
-
Simon Schaufelberger commented and changed TYPO3 Version
98 <span data-processor="relativetime" data-value="2021-06-24T10:35:58+00:00" > 06/24/21, 10:35 </span> -
Benni Mack commented <span data-processor="relativetime" data-value="2026-10-18T16:32:21+00:00" > 10/18/26, 16:32 </span>
Since #105441 (14.2), the documented way to make a select nullable is a null item plus a null default:
'default' => null, 'items' => [['label' => 'Please choose', 'value' => null]],
However, I think it is still valid that select cannot deal with null yet.
This commit dropped the nullable feature: https://github.com/TYPO3/TYPO3.CMS/commit/84be5e616b5373ac7ba57edf2d3cd61251dc6f97#diff-bd96db30f03f9ad888cc42f001e1cc3183de6457df03f96328efa826a9c4ac21