Review main Merged

82517[TASK] Add localRootLine and sysTemplateRows to PageInformation

Christian Kuhn CR +2 V +2 Hard +234 −177 updated 01/19/24, 21:38

Commit message

FE knows two root lines: TSFE->rootLine, which is the
'full' path to pid 0, and TSFE->config['rootLine'], which
is only the 'local' path to the 'root' sys_template record.

The full root line is already PageInformation->getRootLine(),
created by 'TypoScriptFrontendInitialization' middleware.
The very next middleware 'PrepareTypoScriptFrontendRendering'
then gets sys_template records and calculates the local
root line.

The patch relocates sys_template fetching and calculation
of the local root line to 'TypoScriptFrontendInitialization',
now additionally handled in PageInformationFactory.

Both sys_template rows and the local root line are now
modeled in PageInformation, which is already attached
as 'frontend.page.information' Request attribute.

Both root lines are now parellal to each other in the
same object, making the entire thing hopefully more easy
to understand. Usages are adapted accordingly, further
reducing dependencies to TSFE.

Note the sys_template row getter is marked @internal since
extensions usually don't need to mess around with this.

As a side effect, the local root line is no longer cached
in page cache: Caching this was duplicate data since
sys_template rows need to be fetched for *every* call,
and deriving local root line is quick and trivial.
This slightly reduces the size of the page cache for a
calculation that happens anyway.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 14