Review main Abandoned

95118[BUGFIX] Avoid global routes as breadcrumb targets

Ravi Sachaniya CR 0 V 0 Easy +42 −1 updated 11/11/26, 09:12

Commit message

RecordBreadcrumbProvider::extractRouteIdentifier() reused the current
request's route identifier for breadcrumb navigation targets whenever
one was present, to preserve module sub-routes and actions. It did
not check whether that route identifier actually belonged to the
resolved module's own route namespace.

While editing a content element via the full record editing view,
the matched route is the global "record_edit" route, but the module
resolved via the "module" query parameter is still e.g. "web_layout".
The breadcrumb then linked the Layout module and page entries to
"record_edit" instead, which cannot render a form on its own and
shows a misleading permission error.

Only use the route identifier if it equals the module identifier or
is one of its dotted sub-routes; fall back to the module identifier
for any other, unrelated route.

Added tests fixate this behavior.

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Issues 2

Files 2

Review log 34

  1. Ravi Sachaniya uploaded patch set 1 08/06/26, 05:22

  2. core-ci voted on patch set 1 V +1 08/06/26, 05:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105992

  3. Benni Mack commented on patch set 1 11/11/26, 09:12

    Thanks for the patch! The issue has meanwhile been fixed by #110123 ("[BUGFIX] Fix broken module link in breadcrumb", merged in main and 14.3). RecordBreadcrumbProvider::extractRouteIdentifier() now only reuses the current route if the route's own module option is the module the breadcrumb node is built for. record_edit carries no module, so the breadcrumb falls back to the module identifier. A functional test covers this case (breadcrumbUsesModuleIdentifierWhenCurrentRouteBelongsToNoModule). The patch now conflicts with that change. The new test only fails on main because it builds a route with module => web_layout and the identifier record_edit, which can't happen in a real request. Abandoning, thanks again for digging into this!
  4. Benni Mack abandoned the change 11/11/26, 09:12

    Fixed with issue 110123