PathBasedBreadcrumbBuilder is basing the path on the context rather than the $route_match parameter

Created on 6 June 2017, almost 8 years ago
Updated 16 February 2025, about 2 months ago

The build() method of a breadcrumb builder gets given a $route_match parameter, presumably to use to create the breadcrumb.

However, PathBasedBreadcrumbBuilder completely ignores that and instead gets the actual current path from the context:

    $path = trim($this->context->getPathInfo(), '/');

This means that PathBasedBreadcrumbBuilder can't be used in any other contexts, for example to create the breadcrumb for another route to use as the basis for another breadcrumb builder.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component

system.module

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024