#100981traverse(site('configuration') doesn't work in content edit view
Description
It seems that the site configuration is not available in the content editing view for traverse conditions.
To reproduce the issue, please follow these steps:
In the Site Configuration, add the following configuration:
settings: showHeader: 1
In the TSconfig, add the following condition:
[{$showHeader} != 1]
TCEFORM.tt_content.CType.removeItems := addToList(header)
[global]
Result: The Header element is displayed in the new Content Wizard. Even when creating a new element, Header remains available in the CType selection.
However, this approach leads to excessive log entries. The recommendation is to use traverse.
Now, instead of the above condition in TsConfig, use the following condition:
[traverse(site('configuration'), 'settings/showHeader') != 1]
TCEFORM.tt_content.CType.removeItems := addToList(header)
[global]
The Header element will still be displayed in the new Content Wizard, but it will no longer appear in the CType selection when creating or editing an element.
In this test, the value in the Site Configuration does not affect the behavior, as it seems that Site Configuration is not available in the Content Editing for traverse.
(If you change the value in the Site Configuration to 0, the Header element will not be displayed in either case.)
I have tested the same scenario with TYPO3 12, where this behavior does not occur.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 5
- Bug #92516Symfony expressions/conditions doesn't work in user-tsconfig in context menu
- Bug #98588Condition for colpos not working in PageTSConfig
- Bug #104608tree variable doesn't exist in page tsconfig condition when deleting a page
- Bug #105864Site settings configuration is not working in TSconfig condition
- Bug #106435Conditions using `tree` may fail in TSconfig
History 8
-
Jessica Jagodzinski changed description <span data-processor="relativetime" data-value="2023-06-09T07:56:04+00:00" > 06/09/23, 07:56 </span>
-
Georg Ringer changed Related to #98588 <span data-processor="relativetime" data-value="2024-06-11T21:08:10+00:00" > 06/11/24, 21:08 </span>
-
Garvin Hicking changed category <span data-processor="relativetime" data-value="2024-07-31T11:06:08+00:00" > 07/31/24, 11:06 </span>
-
Georg Ringer changed Related to #105864 <span data-processor="relativetime" data-value="2025-03-31T15:22:57+00:00" > 03/31/25, 15:22 </span>
-
Georg Ringer changed Related to #104608 <span data-processor="relativetime" data-value="2025-03-31T15:23:13+00:00" > 03/31/25, 15:23 </span>
-
Georg Ringer changed Related to #92516 <span data-processor="relativetime" data-value="2025-03-31T15:23:27+00:00" > 03/31/25, 15:23 </span>
-
Georg Ringer changed Related to #106435 <span data-processor="relativetime" data-value="2025-03-31T15:23:44+00:00" > 03/31/25, 15:23 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-06T16:54:27+00:00" > 10/06/26, 16:54 </span>
could not reproduce that in v15/v14, closing issue