Project

General

Profile

Actions

Bug #102268

closed

TypoScript conditions for tree.pagelayout do not work correctly on page level 1

Added by Stig Nørgaard Færch 7 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2023-10-27
Due date:
% Done:

100%

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

Description

The pagelayout is not resolved correctly.

To recreate, create a rootline with 4 pages like this:

<?php
$rootLine = [
    [
        'backend_layout_next_level' => 'pagets__default', // Level 0 / TypoScript root template page
    ],
    [
        'backend_layout_next_level' => 'pagets__default', // Level 1
    ],
    [
        'backend_layout_next_level' => '',  // Level 2
    ],
    [
        'backend_layout_next_level' => '',  // Level 3
    ],
];

Add the condition:

[tree.pagelayout == "pagets__default"]
    page.10 = TEXT
    page.10.value = It works!
[else]
    page.10 = TEXT
    page.10.value = It doesn't work :(
[end]

Open the level 1 page. It doesn't work.
Open the level 2 page. It works.
Open the level 3 page. It works.


Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #100764: TS condition does not workResolved2023-04-26

Actions
Related to TYPO3 Core - Task #100047: Modernize condition matching / expression handlingClosed2023-02-28

Actions
Related to TYPO3 Core - Bug #98044: TypoScript conditions for tree.pagelayout do not work correctlyClosed2022-07-28

Actions
Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Has duplicate TYPO3 Core - Bug #102890: array_reverse rootline for PageLayoutResolver::getLayoutForPage callsClosed2024-01-22

Actions
Actions

Also available in: Atom PDF