Issue Bug Resolved

#110737Saving records breaks on check and radio fields using itemsProcFunc

Oliver Bartsch 09/17/26, 21:30 updated 09/23/26, 08:45

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

History 36

  1. Oliver Bartsch commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-22T06:10:11+00:00" > 09/22/26, 06:10 </span>

    Applied in changeset commit:1bd64a4288edb9189892cf3f9b9cc8e6fdc385ee.

  2. Gerrit Code Review pushed patch set 2 for 14.3 to change 95973 status Resolved Under Review <span data-processor="relativetime" data-value="2026-09-23T08:18:57+00:00" > 09/23/26, 08:18 </span>

  3. Oliver Bartsch commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-09-23T08:45:12+00:00" > 09/23/26, 08:45 </span>

    Applied in changeset commit:ea89dabebe8f99cc641aef0e61fc0ecddff3645f.