98167[FEATURE] Resolve page paths as objects
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
- 96331[BUGFIX] Point localized workspace records to live records
- 88374[TASK] Remove flags from module "Layout"
- 88140[TASK] Improve a11y of record list by adding row headers
- 98082[TASK] Inject PackageManager instead of using makeInstance()
- 94015[FEATURE] Rank live search results by relevance
- 95475[WIP][FEATURE] Show all-language content in language comparison
- 92705[BUGFIX] Only offer translations of records the user may localize
- 98096[!!!][TASK] Provide page routers via PageRouterFactory
- 97675[BUGFIX] Resolve record links in the link preview of the RTE
- 97436[!!!][FEATURE] Link content elements as records
- 87873[BUGFIX] Name dropdown toggles and open them natively
- 97235[BUGFIX] Preview hidden pages across site domains
- 96531[BUGFIX] Show versioned MM relations in backend record views
- 97616[BUGFIX] Count references and translations per pid in the backend
- 93819[WIP][BUGFIX] Guard translated tt_content free-mode moves
- 94608[BUGFIX] Persist "All languages" as intent in language selection
- 95741[BUGFIX] Offer localization only where it is permitted
- 84892[TASK] Merge Permissions and Backend Users modules
- 96978[FEATURE] Distinct actions for checkbox and dropdown
- 97262[BUGFIX] Sort workspace module by page tree order and label
- 91304[TASK] Move all LGL labels in core extension to dedicated file and unify syntax
- 96525[!!!][TASK] Unify record title resolution
- 95105[TASK] Apply PHP code simplifications
- 91093[BUGFIX] Add accessible relation between dropdown and its toggle
- 96543[WIP][POC][TASK] Write and read records by the same rules and rights
- 74781[FEATURE] Introduce new slug builders for records and string
- 96319[FEATURE] Undo operations from their notification
- 96159[TASK] Use short translation domain syntax in EXT:workspaces
- 95145[TASK] Migrate LanguageService->sL() labels to new domain syntax
- 82287[FEATURE] Introduce preview rendering for plugins
- 92589[TASK] Replace unneeded instanceof on xxx|null. Use a null check instead
- 95453[WIP][TASK] Use ajax to load the delete message
- 86437[TASK] Throw custom exception database value decoding
- 95211[!!!] Removal of EXT:fluid_styled_content
- 95308[TASK] Deprecate QueryBuilder::castFieldToTextType()
- 94653[WIP] Record Identity
- 92471[POC] Page Layout Views
- 91189[WIP] Module Menu
- 91715[WIP] Add configurable accent/tint color
- 92943[WIP][TASK] Deprecate inline language labels (TYPO3.lang)
- 92180[!!!][TASK] Decouple registration of FormEngine nodes from NodeFactory
- 91414[TASK] Generalize component conversion of button to dropdown item
- 91276[WIP][FEATURE] Switch to list module if page module is on a folder
- 90644[POC][FEATURE] Introduce attribute-based backend module registration
- 81871[TASK] Cache results in BackendUtility::getRecordTitle
- 76792[WIP][TASK] Move view switch in page module
- 80762[WIP] Cleanup RecordList
Show 42 more changes Show less
Issues 2
Files 32
- typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php+0 −2
- typo3/sysext/backend/Classes/Controller/Page/MovePageController.php+10 −2
- typo3/sysext/backend/Classes/Controller/LinkPreviewController.php+7 −1
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php+8 −2
- typo3/sysext/backend/Classes/Form/FieldWizard/RecordsOverview.php+8 −3
- typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php+5 −9
- typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php+15 −5
- typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php+10 −1
- typo3/sysext/backend/Classes/Search/LiveSearch/DatabaseRecordProvider.php+5 −1
- typo3/sysext/backend/Classes/Search/LiveSearch/PageRecordProvider.php+5 −1
- typo3/sysext/backend/Classes/Service/PageLinkMessageProvider.php+8 −3
- typo3/sysext/backend/Classes/Utility/BackendUtility.php+27 −6
- typo3/sysext/backend/Classes/View/PagePathRenderer.phpnew+70 −0
- typo3/sysext/backend/Classes/ViewHelpers/PagePathViewHelper.phpnew+57 −0
- typo3/sysext/backend/Resources/Private/Templates/Page/MovePage.fluid.html+3 −2
- typo3/sysext/backend/Tests/Functional/Utility/Fixtures/RootLine.csv+14 −13
- typo3/sysext/backend/Tests/Functional/Utility/BackendUtilityRootLineTest.php+59 −0
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Fixtures/PagePathViewHelper/pages.csvnew+5 −0
- typo3/sysext/backend/Tests/Functional/ViewHelpers/PagePathViewHelperTest.phpnew+60 −0
- typo3/sysext/core/Classes/Domain/PageAncestry.php+13 −0
- typo3/sysext/core/Classes/Domain/PageAncestryResolver.php+59 −1
- typo3/sysext/core/Classes/Domain/PagePath.phpnew+86 −0
- typo3/sysext/core/Classes/Security/Authorization/Page/PagePermissionEvaluator.php+29 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-111445-ResolvePagePathsAsObjects.rstnew+66 −0
- typo3/sysext/core/Tests/Functional/Security/Authorization/Page/PagePermissionEvaluatorTest.php+17 −0
- typo3/sysext/impexp/Classes/ImportExport.php+4 −3
- typo3/sysext/recycler/Classes/Service/RecyclerService.php+7 −29
- typo3/sysext/recycler/Tests/Functional/Controller/RecyclerAjaxControllerTest.php+12 −0
- typo3/sysext/reports/Classes/Service/ContentStatisticsService.php+9 −1
- typo3/sysext/reports/Resources/Private/Templates/ContentStatisticsDetail.fluid.html+1 −1
- typo3/sysext/workspaces/Classes/Notification/StageChangeNotification.php+6 −1
- typo3/sysext/workspaces/Classes/Service/GridDataService.php+13 −2
Show 12 more files Show less
Review log 59
-
Benni Mack uploaded patch set 1 11/28/26, 19:37
-
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
-
Benni Mack uploaded patch set 2
V +111/28/26, 21:27 -
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
-
Benni Mack uploaded patch set 3
V +111/29/26, 11:08 -
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
-
Benni Mack uploaded patch set 4
V +112/02/26, 11:52 -
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
-
Georg Ringer voted on patch set 4 CR +1 V +1 12/02/26, 14:52