Bug #91450

TCA columnsOverrides don't work for label

Added by Christian Hackl 5 months ago. Updated 17 days ago.

Status:
Closed
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 5 months 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.

#2 Updated by Georg Ringer about 1 month ago

  • Status changed from Needs Feedback to Closed

closing this issue because of lack of feedback

#3 Updated by Christian Ehret 18 days ago

I ran into the same issue today

I tried to change the bodytext label. I can change the field to an input field, but I cannot change the label:

custom_ext/Configuration/TCA/Overrides/tt_content.php looks like this:


$GLOBALS['TCA']['tt_content']['types']['customext_test'] = [
    'showitem' => '
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
            --palette--;;general,
            --palette--;;headers,
            bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext_formlabel,
        --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
            --palette--;;frames,
            --palette--;;appearanceLinks,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
            --palette--;;language,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
            --palette--;;hidden,
            --palette--;;access,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
            categories,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,
            rowDescription,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
    ',
    'columnsOverrides' => [
        'bodytext' => [
            'label' => 'LLL:EXT:custom_ext/Resources/Private/Language/backend.xlf:test.title',
            'config' => [
                'type' => 'input',
                'size' => 30,
                'max' => 255,
            ],
        ],
    ],
];

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
    'tt_content',
    'CType',
    [
        'LLL:EXT:custom_ext/Resources/Private/Language/backend.xlf:test.title',
        'customext_test',
        'content-test',
    ],
    'textmedia',
    'after'
);

#4 Updated by Christian Hackl 17 days ago

sry for my late response,

with TYPO3 8.7.31 this works:

$tempTypes =[
    'custom_type' => [
        'columnsOverrides' => [
            'assets' => [
                'label' => 'Hintergrundbild (1920 x min.1100px)',
            ],
            'image' => [
                'label' => 'Bild für Mobile Ansicht (unterhalb der Tage)',
            ],
        ],
        'showitem' => 'assets,image',
    ],
];
$GLOBALS['TCA']['tt_content']['types'] += $tempTypes;

#5 Updated by Christian Ehret 17 days ago

Christian Hackl wrote:

sry for my late response,

with TYPO3 8.7.31 this works:

[...]

Thank you Christian for your response. I use 10 LTS....

Also available in: Atom PDF