Bug #76242
closedSpecial Menus removed from new content element wizard if TSconfig menu_type.keepItems = 1,2
100%
Description
I have hidden unwanted options from the menu type of the special menus (css_styled_content – tt_content.menu) via TSconfig in TYPO3 7.6.6:
TCEFORM.tt_content.menu_type.keepItems = 1,2
The options are hidden from the "Menu Type" dropdown as expected, but one side affect is that the content element type "Special Menus" disappears from the "New content element wizard". Tested in Safari and Firefox. See screenshot1.
If item 0 (Menu of selected pages) is kept ...
TCEFORM.tt_content.menu_type.keepItems = 0,1,2
... the content element type reappears. screenshot2.
Workaround: It is possible to use "removeItems" instead of "keepItems" and remove all unwanted options manually:
TCEFORM.tt_content.menu_type.removeItems = 0,3,4,5,6,7,8,categorized_pages,categorized_content
This works as axpected and does not hide the content element type.
Files
Updated by Morton Jonuschat over 8 years ago
- Status changed from New to Accepted
You seem to have stumbled upon a difference in the behavior of keepItems and removeItems when a default value gets removed.
As a workaround you can set a new default value for the menu_items like this:
mod.wizards.newContentElement.wizardItems.special.elements.menu.tt_content_defValues.menu_type = 1
The Special Menus content element will be visible again.
Updated by Benjamin Robinson over 8 years ago
Thanks! I didn't knew that "0" is the default by default. Since it is the first entry in the array, it would be preselected automatically in the dropdown, even if there is no default:
mod.wizards.newContentElement.wizardItems.special.elements.menu.tt_content_defValues.menu_type >
Then keepItems works even if "0" ist not in list.
Updated by Gerrit Code Review over 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48226
Updated by Gerrit Code Review over 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48497
Updated by Morton Jonuschat over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 59b7d0d89eeca5d2d2459fa8092dca19cee88aeb.
Updated by Helmut Hummel about 7 years ago
- Related to Bug #82980: Handling of mixed string and 0 broken for keepItems and removeItems page ts added