Issue Task Under Review

#111445Build the record path of a page along the cached page ancestry

Benni Mack 11/14/26, 09:42 updated 11/14/26, 10:14

Description

BackendUtility::getRecordPath() builds the path of a page (“/Root/Section/Page”) shown in the record list, the live search, FormEngine wizards, the preview of content elements, the move page wizard, the workspaces module, the import/export module and others. It uses BackendUtility::BEgetRootLine(), which fetches one page per query via BackendUtility::getPageForRootline(), plus a workspace overlay per page in a workspace. An optional SQL clause – typically the page permissions of the backend user – ends the path at the first page not matching it.

The PageAncestryResolver resolves the ancestry of a page with one query and caches it for the request. It gets a method resolveMatching(), which ends the ancestry at the first page not matching an SQL clause. The clause is evaluated on the live pages of the ancestry with one further query, so any clause works as before, also one modified by the “getPagePermsClause” hook.

getRecordPath() uses it, the paths stay the same. For a page on level seven, a path needs 1 instead of 7 queries in live, and 2 instead of 14 queries in a workspace, plus one query for a permission clause.

Afterwards, BEgetRootLine() is only used by BackendUserAuthentication::isInWebMount() with a custom permission clause, which is the next step towards deprecating BEgetRootLine() and getPageForRootline().

Reviews 1

History 02