Issue Bug Closed

#30636TCA: subtypes_addlist not being processed if the subtype_value_field is in a palette

Ernesto Baschny 10/07/11, 17:32 updated 10/02/18, 12:19

Description

How to reproduce:

Install mc_googlesitemap in TYPO3 4.5 and wonder where the referred fields from the documentation are: they are not rendered. They are supposed to appear in the content element of type “Menu/Sitemap” when you choose one of the newly introduced Subtypes “Sitemaps for Contents” or “Sitemaps for Pages”.

subtype_addlist-bug.png

Background:

Extensions can add fields to an existing table depending on a certain “subtype”. E.g. Content Element of type “menu” has subtype stored in “menu_type”. Extension mc_googlesitemap wants to add fields depending on the menu_type:

$TCA[“tt_content”][“types”][“menu”][“subtype_value_field”]=“menu_type”;
$TCA[“tt_content”][“types”][“menu”][“subtypes_addlist”][$_EXTKEY.”_pi1”]= …

This used to work fine since 4.4, but in 4.5 the “menu_type” field is now inside a palette, so the new fields have no place to be positioned and so they are not rendered at all.

Solution:

Go through the palettes too, and add the new fields right after the palette where the field resides in. Now it looks like this:

subtype_addlist-correct.png

Reviews 1