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.
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:
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\Registrythe methodisAllowedInColumnfetches thecontent_defenderconfiguration using the variable$cTypeinstead 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.