Review main Merged

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

Benni Mack 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
    • Wouter Wolters +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 79

  1. Benni Mack uploaded patch set 1 09/07/26, 16:30

  2. core-ci voted on patch set 1 V +1 09/07/26, 16:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108015

  3. Benni Mack rebased onto patch set 2 V +1 11/10/26, 18:02

  4. Benni Mack marked it ready for review 11/10/26, 18:02

  5. core-ci voted on patch set 2 V +1 11/10/26, 18:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113928

  6. Garvin Hicking voted on patch set 2 CR +1 11/11/26, 21:26

  7. Wouter Wolters voted on patch set 2 CR +1 V +1 11/11/26, 21:31

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

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