Project

General

Profile

Actions

Bug #102452

closed

TypoScript constants from site settings are not substituted in Backend Extbase Modules

Added by Nikita Hovratov 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2023-11-22
Due date:
% Done:

100%

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

Description

I noticed this problem, when my log had some entries, which looked like this:

Wed, 22 Nov 2023 12:49:32 +0100 [ERROR] request="6c4905c77d33f" component="TYPO3.CMS.Core.TypoScript.IncludeTree.Visitor.IncludeTreeConditionMatcherVisitor": Expression could not be parsed. - {"expression":"traverse(page, \"uid\") {$searchformPid}"}

This is only relevant for the Frontend and it works in this context. But when I open an Extbase backend module e.g. The Backend User Administration module, this error gets logged.
In the Bootstrap process of Extbase, the first site is fetched (as there is no site context in BE) and then the TypoScript is loaded from there.

How to reproduce:

1. Add site settings for the first site: customPid: 1
2. Add some TypoScript for the Frontend e.g.:

page = PAGE
page.9999 = TEXT
page.9999.value = Pinguin
[traverse(page, "uid") == {$customPid}]
    page.9999.value = Känguru
[end]

3. Visit the frontend and have a look at the log file. It should be empty.
4. Now go to the backend and open the Backend User Management Module.
5. You should see the log entry:

Wed, 22 Nov 2023 14:19:58 +0000 [ERROR] request="b9f181abd3a67" component="TYPO3.CMS.Core.TypoScript.IncludeTree.Visitor.IncludeTreeConditionMatcherVisitor": Expression could not be parsed. - {"expression":"traverse(page, \"uid\") {$customPid}"}


Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Bug #92528: TypoScript site constants not always populatedClosed2020-10-09

Actions
Related to TYPO3 Core - Bug #102357: PageTsConfig: site settings / constants are not substituted in FormEngineNeeds Feedback2023-11-09

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

Actions
Related to TYPO3 Core - Bug #93746: Conditions in Page TSconfig using site settings trigger errors when page with UID 0 is selected in BEClosed2021-03-15

Actions
Actions #1

Updated by Nikita Hovratov 5 months ago

  • Related to Bug #92528: TypoScript site constants not always populated added
Actions #2

Updated by Nikita Hovratov 5 months ago

  • Related to Bug #102357: PageTsConfig: site settings / constants are not substituted in FormEngine added
Actions #3

Updated by Christian Kuhn 3 months ago

Actions #4

Updated by Gerrit Code Review 3 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82521

Actions #5

Updated by Christian Kuhn 3 months ago

  • Related to Bug #93746: Conditions in Page TSconfig using site settings trigger errors when page with UID 0 is selected in BE added
Actions #6

Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82558

Actions #7

Updated by Christian Kuhn 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF