Project

General

Profile

Actions

Bug #101947

closed

Conditions in User TSconfig do not work

Added by Georg Tiefenbrunn 8 months ago. Updated 8 months ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2023-09-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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 [...]

Actions

Also available in: Atom PDF