Review main Merged

97425[TASK] Resolve page context, site and previews along the ancestry

Benni Mack CR +2 V +2 Normal +82 −71 updated 11/09/26, 20:52

Commit message

Further callers of BackendUtility::BEgetRootLine() use the
PageAncestryResolver. They resolve the ancestry of a page with one
query, cached for the request, in the workspace of the backend
user. Before, they resolved the live rootline and ignored pages
moved in a workspace.

* PageContext keeps the PageAncestry of the page instead of a
  rootline array, resolved by the PageContextFactory.
* The backend SiteResolver middleware resolves the site along the
  same ancestry, so the site and the page context share one query.
* PreviewUriBuilder resolves the ancestry of the previewed page
  itself, before BeforePagePreviewUriGeneratedEvent is dispatched,
  so callers no longer hand in a rootline. getPreviewPageId()
  evaluates Page objects and detects pages deleted in a workspace.
* TreeController (rootline of a page), RecordBreadcrumbProvider and
  the entry points of PageTreeRepository use the ancestry as well.
* The live URL of the workspace preview and the check for pages
  hiding their subpages in linkvalidator resolve the live ancestry.

BEgetRootLine() executes one query per page level, two in a
workspace, and caches its result per variant of overlay and where
clause. A backend request therefore walked the rootline of the same
page several times, for the site, the page TSconfig and the previews.
These now share one ancestry query per page and workspace for the
request. For a page on level seven, this is 1 instead of 7 queries in
live and 2 instead of 14 queries in a workspace. The page access
check of readPageAccess() still walks the page tree with its
permission clause.

Review

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

Issues 2

Files 19

Review log 68

  1. Benni Mack uploaded patch set 1 11/09/26, 10:46

  2. core-ci voted on patch set 1 V +1 11/09/26, 11:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113650

  3. Benni Mack uploaded patch set 2 V +1 11/09/26, 11:12

  4. Benni Mack marked it ready for review 11/09/26, 11:12

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

  6. Georg Ringer voted on patch set 2 CR +1 V +1 11/09/26, 19:27

  7. Benni Mack voted on patch set 2 CR +2 V +2 11/09/26, 20:52

  8. Benni Mack merged patch set 3 11/09/26, 20:52