Review 14.3 Merged

95236[BUGFIX] Fix broken module link in breadcrumb

Stefan Bürk CR +2 V +2 Hard +421 −67 updated 08/10/26, 23:39

Commit message

When editing a record from a module, the breadcrumb rendered a module
node whose link led nowhere: clicking "Users" while editing a backend
user opened /typo3/record/edit without any parameters, which fails with
"Edit form could not be loaded".

RecordBreadcrumbProvider::extractRouteIdentifier() reused the route
identifier of the current request for the current module, including a
sub-route or action. The breadcrumb renders every node from that single
identifier and supplies the page id as the only parameter, so the reused
route has to be enterable with that alone.

The identifier is now only reused when the current route belongs to the
module the node is built for, and when the current request carried no
parameters beyond the ones the breadcrumb supplies. A generic action
route such as record_edit carries no module at all, and a route that
needed further parameters - the site configuration edit route with its
site identifier, or a module sub-route with a required argument such as
the active TypoScript edit route - describes a view that can not be
reconstructed for another page. Both now fall back to the module
identifier, which is always a valid entry point.

Preserving a sub-route that is parameterized by the page id alone keeps
working, which is what issue #108072 asked for.

The site configuration views built their breadcrumb from the site root
page alone, which left the detail view unreachable from the two edit
views and gave all three the same trail. They now build it explicitly:
the module, the site root page linking to the detail view, and the
current step below it, carrying the same icon as the button that leads
there from the site overview. The module is not navigated via the page
tree, so no page rootline is involved.

The functional tests around the provider built their route with
TYPO3\CMS\Core\Routing\Route, whose second constructor argument is
$defaults rather than $options. The route identifier therefore never
reached getOption() and the tests passed through the fallback branch.
They now use the backend route and the real RouteResult, and cover both
the preserved and the discarded case.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 5

Review log 34

  1. Stefan Bürk commented on patch set 1 08/10/26, 23:30

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 08/10/26, 23:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106344

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 08/10/26, 23:39

  4. Stefan Bürk merged patch set 2 08/10/26, 23:39