Project

General

Profile

Actions

Bug #100359

closed

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

Added by Chris Müller about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2023-03-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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' => '',
]],

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #99739: Associative array keys for TCA itemsClosed2023-01-28

Actions
Actions #1

Updated by Chris Müller about 1 year ago

  • Related to Feature #99739: Associative array keys for TCA items added
Actions #2

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78333

Actions #3

Updated by Nikita Hovratov about 1 year ago

Thanks, yes there was no TCA migration for site TCA yet. This affects all new TCA types / deprecations.

Actions #4

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78333

Actions #5

Updated by Nikita Hovratov about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF