Review main Ready for review

98167[FEATURE] Resolve page paths as objects

Benni Mack CR +1 V +1 Hard +698 −89 updated 12/02/26, 14:52

Commit message

The backend shows the location of a page or record in the page tree as
a path like "/Home/About us/" in the record list, the live search,
FormEngine wizards, content element previews, the move page wizard, the
workspaces module and others. All of them used
BackendUtility::getRecordPath(), which walks the page tree with
BEgetRootLine(), one query per page level, and returns a formatted
string, cut at the first page not matching an SQL clause.

PageAncestryResolver now resolves a PagePath object from the cached
page ancestry: resolvePath() for the whole path of a page in a
workspace, resolveShownPath() for the path a backend user may see,
ending below the first page the user must not see. The permissions are
evaluated on the ancestry without a further query, as long as no
listener modifies the page permission constraint. Both methods and
PagePath are public API, the ancestry itself stays internal.

Code passes PagePath objects around. The text is rendered by the
internal PagePathRenderer and in templates with the new <be:pagePath>
ViewHelper.

All callers of getRecordPath() in the Core are migrated, so
BEgetRootLine() is only called by getRecordPath() itself, which is
deprecated in a later step. The paths stay the same, also for the uid
of a workspace version and for translated pages. A permission clause
other than the show permissions, which no Core caller passes, now ends
the path like the show permissions. Stage change notifications resolve
the path in the workspace of the notification instead of the workspace
of the current user. The element information no longer resolves a
path for references, which its template never showed.
Show more Show less
Resolves: #111445
Related: #111307
Releases: main
Change-Id: I3591964b0d04f8d96ef6aa8f280ceee70e083426

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/67/98167/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/67/98167/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Georg Ringer +1
  • Verified V +1 Needs a vote
    • Georg Ringer +1
    • core-ci +1 CI

Merge conflicts 47

Show 42 more changes Show less

Issues 2

Files 32

Show 12 more files Show less

Review log 59

  1. Benni Mack uploaded patch set 1 11/28/26, 19:37

  2. core-ci voted on patch set 1 V +1 11/28/26, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115886

  3. Benni Mack uploaded patch set 2 V +1 11/28/26, 21:27

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

  5. Benni Mack uploaded patch set 3 V +1 11/29/26, 11:08

  6. core-ci voted on patch set 3 V +1 11/29/26, 11:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115941

  7. Benni Mack uploaded patch set 4 V +1 12/02/26, 11:52

  8. core-ci voted on patch set 4 V +1 12/02/26, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116173

  9. Georg Ringer voted on patch set 4 CR +1 V +1 12/02/26, 14:52