Issue Bug Closed

#100359Using TCA type "checkbox" in custom site configuration field throws error

Chris Müller 03/30/23, 12:01 updated 07/09/24, 12:55

Description

When using the type “checkbox” in a custom site configuration, like:

'config' => [
    'type' => 'check',
    'renderType' => 'checkboxToggle',
    'items' => [[
        0 => '',
        1 => '',
    ]],
]

the following error is thrown:

Item 0 of field <the-field> of TCA table site has no label

I assume, the TCA migrations are not applied.

An example usage can be found in EXT:matomo_integration with version 1.5.0.

A workaround to stay compatible with TYPO3 v11 and v12 is:

'items' => [[
    0 => '',
    1 => '',
    'label' => '',
    'value' => '',
]],

Reviews 1