Review 14.3 Merged

97566[BUGFIX] Do not log unresolved TSconfig constants as errors

Georg Ringer CR +2 V +2 Normal +158 −0 updated 11/11/26, 22:49

Commit message

Page TSconfig conditions containing a site setting are handed to
symfony expression language verbatim when the constant could not be
substituted. The lexer then fails on the "$" of "{$aSetting}", and
IncludeTreeConditionMatcherVisitor logs the SyntaxError as ERROR.

This happens routinely: PageTsConfigFactory only substitutes constants
for a Site with settings, while BackendUtility::getPagesTSconfig()
falls back to NullSite for every page outside a site - the page tree
root, records on pid 0, or the DataHandler in CLI context. The very
same TSconfig thus works on one page and logs an error on the next,
filling up the log file with one entry per evaluation.

An unresolvable constant is an expected state, not a parse failure.
Such conditions are now detected before the expression is evaluated,
are considered not matching as before, and are reported at NOTICE
level, which the default FileWriter does not persist. Conditions with
genuinely broken syntax keep being logged as ERROR.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
  • Verified V +2 Done
    • Georg Ringer +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 46

  1. Georg Ringer commented on patch set 1 11/11/26, 22:18

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 11/11/26, 22:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114147

  3. Georg Ringer uploaded patch set 2 V -1 11/11/26, 22:42

  4. core-ci voted on patch set 2 V +1 11/11/26, 22:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114149

  5. Georg Ringer voted on patch set 2 CR +2 V +2 11/11/26, 22:49

  6. Georg Ringer merged patch set 3 11/11/26, 22:49