Project

General

Profile

Actions

Bug #104608

open

tree variable doesn't exist in page tsconfig condition when deleting a page

Added by Hannes Bochmann 3 months ago. Updated 20 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2024-08-13
Due date:
% Done:

0%

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

Description

I got the following condition in page tsconfig:

[44 in tree.rootLineIds || 55 in tree.rootLineIds || 91 in tree.rootLineIds || 144 in tree.rootLineIds || 148 in tree.rootLineIds]
    TCAdefaults {
        pages {
            no_index = 1
            no_follow = 1
            no_search = 1
        }
    }
[end]

Now when I delete a page in any page tree I get the following error logged:

Extension/Facility: TYPO3.CMS.Core.TypoScript.IncludeTree.Visitor.IncludeTreeConditionMatcherVisitor
Message: Expression could not be parsed.
Exception message of the Symfony\Component\ExpressionLanguage\SyntaxError: Variable "tree" is not valid at around position...

This error only occurs if the page tsconfig is added in the ext_localconf.php or ext_tables.php file of a extension via

ExtensionManagementUtility::addPageTSConfig(
    '@import \'EXT:ext_key/Configuration/TsConfig/Page/All.tsconfig\''
);

If I add the tsconfig through a page record and it's TSconfig field everything is fine and no error occurs.

Is this a known limitation or a bug?

Actions

Also available in: Atom PDF