Skip to content

isAllowedInColumn in B13\Container\Tca\Registry checks disallowed configuration against child $cType instead of $containerCType #757

Description

@cbammann

TYPO3 Version: 14.3.4
Container Version: 4.0.2

I have nested containers, e.g. a 1col container that contains a 2col container, and the child container (2col) has the following configuration, to prevent that containers of the same type (2col) can be inserted:

'disallowedContentTypes' => '2col'

The 1col container has no restrictions.
In the backend preview however, after inserting a 2col container into a 1col container (which works without problems), there is a message saying "This element of type "2col" is not allowed in this column.

After debugging, I found that in B13\Container\Tca\Registry the method isAllowedInColumn fetches the content_defender configuration using the variable $cType instead of $containerCType. So it uses the configuration of the child type to check which types are disallowed for the parent container type. The check for the allowed types afterwards uses the correct $containerCType.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions