Project

General

Profile

Actions

Bug #95996

closed

TCA columns type inline overrideChildTca CType dosen't get recognized correctly.

Added by Tobias Ulber over 2 years ago. Updated 27 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Start date:
2021-11-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
hard
Is Regression:
Yes
Sprint Focus:

Description

I have created a inline Element that should only hold elements of CType text. With Typo3 version 11 this is not working anymore:

<?php

$GLOBALS['TCA']['tt_content']['columns']['text_tab_text_elements'] = [
    'config' => [
        'appearance' => [
            'collapseAll' => '1',
            'enabledControls' => [
                'dragdrop' => '1',
            ],
            'levelLinksPosition' => 'top',
            'showAllLocalizationLink' => '1',
            'showPossibleLocalizationRecords' => '1',
            'showSynchronizationLink' => '1',
            'useSortable' => '1',
        ],
        'foreign_sortby' => 'sorting',
        'foreign_table' => 'tt_content',
        'overrideChildTca' => [
            'columns' => [
                'colPos' => [
                    'config' => [
                        'default' => '999',
                    ],
                ],
                'CType' => [
                    'config' => [
                        'default' => 'text',
                    ],
                ],
            ],
        ],
        'type' => 'inline',
        'foreign_field' => 'text_tab_text_elements_parent',
    ],
    'exclude' => '1',
    'label' => 'LLL:EXT:sitepackage/Resources/Private/Language/Backend.xlf:text_tab_text_elements.label',
];

If I create a new element that is using the text_tab_text_elements column and then create a child relation, the element renders the CType text form elements. But in the CType selectbox, the CType that is selected is not text. Text is not even appearing in the CType selectbox. After saving the records CType of the child elements is not text in the database.

Im not sure if this is a bug or if something changed in Typo3 11. This code works perfectly in Typo3 10. If something has changed in Typo3 11 there should be a TCA migration hint.

Actions #1

Updated by Tobias Ulber over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Tobias Ulber over 2 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #3

Updated by Tobias Ulber over 2 years ago

  • Category changed from DataHandler aka TCEmain to Form Framework
Actions #4

Updated by Tobias Ulber over 2 years ago

  • Description updated (diff)
Actions #5

Updated by Tobias Ulber over 2 years ago

  • Private changed from No to Yes
Actions #6

Updated by Tobias Ulber over 2 years ago

Tobias Ulber wrote:

I have created a inline Element that should only hold elements of CType text. With Typo3 version 11 this is not working anymore:

[...]

If I create a new element that is using the text_tab_text_elements column and then create a child relation, the element renders the CType text form elements. But in the CType selectbox, the CType that is selected is not text. Text is not even appearing in the CType selectbox. After saving the records CType of the child elements is not text in the database.

Im not sure if this is a bug or if something changed in Typo3 11. This code works perfectly in Typo3 10. If something has changed in Typo3 11 there should be a TCA migration hint.

This issue is caused by the "ichhabrecht/content-defender" extension.
I created a local patch an moved the issue to the content-defender github repository(https://github.com/IchHabRecht/content_defender/issues/92).

This issue can be closed.

Actions #7

Updated by Benni Mack 27 days ago

  • Status changed from New to Closed
  • Private changed from Yes to No

Hey Tobias,

thanks for letting us know, will close the issue.

Actions

Also available in: Atom PDF