#110737Saving records breaks on check and radio fields using itemsProcFunc
Description
DataHandler composes the items of a check and of a radio field itself before it accepts a value for them, in checkValueForCheck() and checkValueForRadio() . Two things go wrong there.
1. A checkbox leaving its boxes to a processor ends the save with a TypeError
checkValueForCheck() reads the declared items as optional: $items = $tcaFieldConf[‘items’] ?? null;
and six lines later hands them on as required: SelectItemCollection::createFromArray($tcaFieldConf['items'], ...)
TypeError: SelectItemCollection::createFromArray(): Argument #1
($itemList) must be of type array, null given
2. A processor that throws is not caught
ItemProcessingService::processItems() wraps anything a processor raises into an ItemsProcessorExecutionFailedException . Neither checkValueForCheck() nor checkValueForRadio() catches it, so it leaves DataHandler and ends the request. The editing form has always caught it:
ItemProcessingService::getProcessingItems() turns it into a flash message and keeps the items the field declares.
This is a regression of #107889, which replaced the getProcessingItems() call in checkValueForCheck() with a direct processItems() call.
Impact
Defaults are applied for every column of a new record, so a single field of this shape makes every new record of that table fail, not only records the
field was submitted with. That covers the backend form, the REST-like write paths and every extension using DataHandler.
How to reproduce
Add to any table, e.g. tt_content :
'test_checkbox' => [
'config' => [
'type' => 'check',
'itemsProcFunc' => SomeProcessor::class . '->getItems',
],
],
with a processor that appends its single box. Creating any `tt_content` record now fails with the TypeError above. Declaring `items` and letting the processor throw instead reproduces the second case.
Expected
A processor that cannot run leaves the boxes the field itself declares for a checkbox, and no further item to compare against for a radio, the same fallback the editing form applies. Neither case aborts the save.
Reviews 2
Related issues 1
History 36
-
Oliver Bartsch changed Related to #107889 <span data-processor="relativetime" data-value="2026-09-17T21:31:21+00:00" > 09/17/26, 21:31 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 95905 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-17T21:33:54+00:00" > 09/17/26, 21:33 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 95973 <span data-processor="relativetime" data-value="2026-09-22T06:07:24+00:00" > 09/22/26, 06:07 </span>
-
Oliver Bartsch commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-22T06:10:11+00:00" > 09/22/26, 06:10 </span> -
Gerrit Code Review pushed patch set 2 for 14.3 to change 95973 status
ResolvedUnder Review <span data-processor="relativetime" data-value="2026-09-23T08:18:57+00:00" > 09/23/26, 08:18 </span> -
Oliver Bartsch commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2026-09-23T08:45:12+00:00" > 09/23/26, 08:45 </span>Applied in changeset commit:ea89dabebe8f99cc641aef0e61fc0ecddff3645f.
Applied in changeset commit:1bd64a4288edb9189892cf3f9b9cc8e6fdc385ee.