[BUGFIX] Adding new menu types triggers error 91/27591/2
authorFrancois Suter <francois@typo3.org>
Thu, 13 Feb 2014 08:10:53 +0000 (09:10 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 24 Feb 2014 21:36:34 +0000 (22:36 +0100)
With the addition of categories-related menus, new fields were added
to the tt_content "menu" palette for handling categories relations.
This causes problems when people define new menu types.

This patch adds the categories-related fields in a more targeted
way using subtypes_addlist. The difference is that these fields
are not *in* the palette anymore, but just after it. I think
it is okay from a usability point of view and it makes the whole
categories thing less intrusive.

Resolves: #54041
Releases: 6.2
Change-Id: I923a6ec0d7716821626a31a95d80027987038bf1
Reviewed-on: https://review.typo3.org/27591
Tested-by: Dirk Klimpel
Reviewed-by: Dirk Klimpel
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/frontend/Configuration/TCA/tt_content.php

index 339da0b..643070a 100644 (file)
@@ -1725,17 +1725,13 @@ return array(
                                --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended',
                        'subtype_value_field' => 'menu_type',
                        'subtypes_excludelist' => array(
-                               '0' => 'selected_categories, category_field',
-                               '1' => 'selected_categories, category_field',
-                               '2' => 'pages, selected_categories, category_field',
-                               '3' => 'selected_categories, category_field',
-                               '4' => 'selected_categories, category_field',
-                               '5' => 'selected_categories, category_field',
-                               '6' => 'selected_categories, category_field',
-                               '7' => 'selected_categories, category_field',
-                               '8' => 'selected_categories, category_field',
-                               '9' => 'pages',
+                               '2' => 'pages',
+                               'categorized_pages' => 'pages',
                                'categorized_content' => 'pages',
+                       ),
+                       'subtypes_addlist' => array(
+                               'categorized_pages' => 'selected_categories;;menu, category_field;;menu',
+                               'categorized_content' => 'selected_categories;;menu, category_field;;menu',
                        )
                ),
                'mailform' => array(
@@ -1915,7 +1911,7 @@ return array(
                        'canNotCollapse' => 1
                ),
                'menu' => array(
-                       'showitem' => 'menu_type;LLL:EXT:cms/locallang_ttc.xlf:menu_type_formlabel, --linebreak--, pages;LLL:EXT:cms/locallang_ttc.xlf:pages.ALT.menu_formlabel, --linebreak--, selected_categories, category_field',
+                       'showitem' => 'menu_type;LLL:EXT:cms/locallang_ttc.xlf:menu_type_formlabel, --linebreak--, pages;LLL:EXT:cms/locallang_ttc.xlf:pages.ALT.menu_formlabel',
                        'canNotCollapse' => 1
                ),
                'menu_accessibility' => array(