#111300Extract page ancestry CTE from RootlineUtility into a reusable service
Description
RootlineUtility resolves the rootline of a page, including workspace overlays, with a single recursive common table expression (CTE) since #104506. The CTE is however locked into RootlineUtility, which also handles mount points, language overlays and relation resolving for the frontend.
The backend still uses BackendUtility::BEgetRootLine(), which executes one query per page level, plus additional workspace overlay queries per level in a workspace. Callers like BackendUserAuthentication::isInWebMount(), BackendUtility::readPageAccess(), getRecordPath() and getPagesTSconfig() walk the same rootline several times per request, as the runtime cache is keyed by the given where clause.
As a first step, the recursive CTE is moved into an internal service PageAncestryRepository. It returns the workspace-resolved page records from the given page up to the root level, without language overlays, mount point handling or access restrictions besides the deleted flag. RootlineUtility uses this service, so the frontend behaviour does not change.
This allows a backend service in a follow-up, which resolves the ancestry of a page as Page objects together with the effective permissions of a backend user using one database query, and eventually replaces BackendUtility::BEgetRootLine().
Reviews 3
History 12
-
Gerrit Code Review pushed patch set 1 for main to change 97253 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-31T10:58:34+00:00" > 10/31/26, 10:58 </span> -
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-01T10:15:25+00:00" > 11/01/26, 10:15 </span>
Applied in changeset commit:2cfed3bb090fa2ceb48fda6aaec42be029b8756e.