Project

General

Profile

Actions

Bug #86837

closed

TypoScript Condition: tree.* broken on cached pages

Added by Philipp Seiler over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2018-11-02
Due date:
% Done:

0%

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

Description

Implement a basic TypoScript condition for swapping out page content for a certain page ID:

page.10 >
page.10 = TEXT
page.10.value = foo

[3 in tree.rootLineIds]
page.10 >
page.10 = TEXT
page.10.value = bar
[END]

Clear all caches.

Call page with ID 3 results in "bar" as output. OK.
If I log the \TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher constructor, the class member $tree->rootLineIds contains the rootline of the current page, just as expected (e.g.):

Array
(
    [0] => 1
    [1] => 3
)

Keep reloading the page, output stays "bar", everything OK.

Call a different page, e.g. ID 105. Results in "foo" as output. OK.
$tree->rootLineIds from the ConditionMatcher class logs as follows:

Array
(
    [0] => 1
    [1] => 2
    [2] => 105
)

Keep reloading the page, output stays "foo". BUT: $tree->rootLineIds log now shows an empty array.

Call page with ID 3 again. Output is now "foo", $tree->rootLineIds stays empty.
Condition doesn't match anymore!

Probably something wrong with cacheing.


Files

m1.png (819 KB) m1.png Dmitry Dulepov, 2019-05-06 13:16
m2.png (824 KB) m2.png Dmitry Dulepov, 2019-05-06 13:18

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #86807: Some symfony expression condition won't work reliable (in TypoScript)Closed2018-10-30

Actions
Is duplicate of TYPO3 Core - Bug #88374: [xxx in tree.rootLineIds] TypoScript condition causes page cache regeneration on each requestClosed2019-05-16

Actions
Actions

Also available in: Atom PDF