Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecations: The TCA field 'CType' of table 'tt_content' uses the legacy way of defining 'items'. Please switch to associated array keys: label, value, icon, group, description. #743

Closed
SSFGizmo opened this issue Mar 27, 2024 · 6 comments
Assignees
Labels

Comments

@SSFGizmo
Copy link

SSFGizmo commented Mar 27, 2024

The TCA field 'CType' of table 'tt_content' uses the legacy way of defining 'items'. Please switch to associated array keys: label, value, icon, group, description.

OLD

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt

// Add content element to selector list
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
    'tt_content',
    'CType',
    [
        '{plugin.name -> k:format.quoteString()}',
        '{extension.extensionKey}_{plugin.key}',
        '{extension.extensionKey}-plugin-{plugin.key}',
        '{extension.extensionKey}'
    ]
);

Perhaps it can help
NEW

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt

// Add content element to selector list
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
    'tt_content',
    'CType',
    [
        'label' => '{plugin.name -> k:format.quoteString()}',
        'value' => '{extension.extensionKey}_{plugin.key}',
        'icon'  => '{extension.extensionKey}-plugin-{plugin.key}',
        'group' => '{extension.extensionKey}'
    ]
);

TYPO3 Version
v12.4

Extension Builder Version:
v12.0.0-beta.2

@SSFGizmo
Copy link
Author

The TCA field 'l10n_parent' of table 'xxx' uses the legacy way of defining 'items'. Please switch to associated array keys: label, value, icon, group, description.

OLD

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt

        'l10n_parent' => [
            'displayCond' => 'FIELD:sys_language_uid:>:0',
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectSingle',
                'default' => 0,
                'items' => [
                    ['', 0],

NEW

        'l10n_parent' => [
            'displayCond' => 'FIELD:sys_language_uid:>:0',
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectSingle',
                'default' => 0,
                'items' => [
                    ['label' => '', 'value' => 0],

@SSFGizmo
Copy link
Author

SSFGizmo commented Mar 27, 2024

OLD

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt

        'starttime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
            'config' => [
                'type' => 'input',
                'renderType' => 'inputDateTime',
                'eval' => 'datetime,int',
                'default' => 0,
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],
        'endtime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
            'config' => [
                'type' => 'input',
                'renderType' => 'inputDateTime',
                'eval' => 'datetime,int',
                'default' => 0,
                'range' => [
                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
                ],
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],</f:if><f:if condition="{domainObject.categorizable}">

NEW

        'starttime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
            'config' => [
                'type' => 'datetime',
                'format' => 'datetime',
                'default' => 0,
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],
        'endtime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
            'config' => [
                'type' => 'datetime',
                'format' => 'datetime',
                'default' => 0,
                'range' => [
                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
                ],
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],</f:if><f:if condition="{domainObject.categorizable}">

@PKuhlmay PKuhlmay added this to the Next v12 Release milestone Mar 27, 2024
@SSFGizmo
Copy link
Author

OLD

Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt

        'hidden' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
            'config' => [
                'type' => 'check',
                'renderType' => 'checkboxToggle',
                'items' => [
                    [
                        0 => '',
                        1 => '',
                        'invertStateDisplay' => true
                    ]
                ],
            ],
        ],</f:if><f:if condition="{domainObject.addStarttimeEndtimeFields}">

NEW

  'hidden' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
            'config' => [
                'type' => 'check',
                'renderType' => 'checkboxToggle',
                'items' => [
                    [
                        'label' => '',
                        'invertStateDisplay' => true,
                    ],
                ],
            ],
        ],</f:if><f:if condition="{domainObject.addStarttimeEndtimeFields}">

@PKuhlmay
Copy link
Collaborator

Thank you very much. I will have a look at it.

@PKuhlmay PKuhlmay self-assigned this Mar 28, 2024
DavidBruchmann added a commit to DavidBruchmann/extension_builder that referenced this issue Mar 29, 2024
PKuhlmay pushed a commit that referenced this issue Mar 29, 2024
@PKuhlmay
Copy link
Collaborator

fixed by #747

@DavidBruchmann
Copy link
Contributor

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants