Bug #91450

TCA columnsOverrides don't work for label

Added by Christian Hackl 5 days ago. Updated 4 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-20
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the example below (TCA => customExt/Configuration/TCA/Overrides/tt_content.php), the "label" field within "columnsOverrides" is ignored, while the "config" array works.
The PageTs example works well too.

$colpreviewTypes = [
    'myCustomType' => [
        'showitem' => '
            ...,
            space_after_class,
            ...,
        ',
        'columnsOverrides' => [
            'space_after_class' => [
                'label' => 'Columns header size',
                'config' => [
                    'type' => 'input',
                    'renderType' => 'colorpicker',
                    'size' => 10,
                ],
            ],
        ],
    ],
];
$GLOBALS['TCA']['tt_content']['types'] += $colpreviewTypes;
TCEFORM {
    tt_content {
        space_after_class.types {
            myCustomType.label = testing
        }
    }
}

History

#1 Updated by Oliver Bartsch 4 days ago

  • Status changed from New to Needs Feedback

Hi, based on your example I tried to reproduce this with latest master (10.4.4-dev) but everything seems to work fine.

That's my configuration:

<?php
// typo3conf/ext/<ext_key>/Configuration/TCA/Overrides/tt_content.php

$colpreviewTypes = [
    'customtype' => [
        'showitem' => 'space_before_class',
        'columnsOverrides' => [
            'space_before_class' => [
                'label' => 'custom label'
            ]
        ]
    ]
];

$GLOBALS['TCA']['tt_content']['types'] += $colpreviewTypes;

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
    'tt_content',
    'CType',
    ['Custom type', 'customtype']
);

You may want to try this example in your codebase. Furthermore if the bug persists, please have a look in the configuration module, if your configuration is recognised there. If you see the configuration there but still don't see your overwritten label in FormEngine, a more detailed configuration might help.

Also available in: Atom PDF