Bug #101947
closedConditions in User TSconfig do not work
0%
Description
I am aware that most of the User TSconfig options are only useful in the global context or can only be defined once.
Extensions using objects based on standard pages
(as e.g. EXT:blog) should be able to disable e.g. unwanted actions like cut/paste or manual sorting.
Steps to reproduce:
Use ExtensionManagementUtility::addUserTSConfig()
in ext_localconf.php
to add User TSconfig.
Working TSconfig¶
options.disableDelete.pages = 1 options.contextMenu.table.pages.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus options.contextMenu.table.pages.tree.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus
Non-working TSconfig¶
[traverse(page, "module") == "blog"] options.disableDelete.pages = 1 options.contextMenu.table.pages.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus options.contextMenu.table.pages.tree.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus [END] [traverse(page, "doktype") == 137] options.disableDelete.pages = 1 options.contextMenu.table.pages.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus options.contextMenu.table.pages.tree.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus [END] [tree.pagelayout == "pagets__BlogPost"] options.disableDelete.pages = 1 options.contextMenu.table.pages.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus options.contextMenu.table.pages.tree.disableItems = pagesSort, pagesNewMultiple, hideInMenus, showInMenus [END]
References¶
https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/UsingSetting/Conditions.html
It is possible to use TypoScript conditions in both user TSconfig and page TSconfig [...]
Updated by Christian Kuhn about 1 year ago
- Status changed from New to Rejected
https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/UsingSetting/Conditions.html#page
"All data of the current page record as array. Only available in page TSconfig, not in user TSconfig."
By nature, user tsconfig does not have the current page. I hardly see an option to change this.
Updated by Georg Tiefenbrunn about 1 year ago
By nature, user tsconfig does not have the current page. I hardly see an option to change this.
Thanks for pointing this out. Unfortunately I also see no way how to easily fix this.
Please re-reject the issue.
Updated by Stefan Bürk about 1 year ago
- Status changed from New to Rejected
Georg Tiefenbrunn wrote in #note-3:
By nature, user tsconfig does not have the current page. I hardly see an option to change this.
Thanks for pointing this out. Unfortunately I also see no way how to easily fix this.
Please re-reject the issue.
Rejected the request for now as requested.