When a route takes an entity id as parameter, easy_breadcrumb interprets the route as an entity canonical route and uses the title of the entity as the breadcrumb instead of the title of the route.

This is noticeable when in easy_breadcrumb settings you check "Include the current page as a segment in the breadcrumb".

Take this route that accepts a group entity id (group entity provided by the group module):

example_module.reports_dashboard:
  path: '/group/{group}/reports/dashboard'
  defaults:
    _controller: '\Drupal\example_module\Controller\DashboardController::dashboard'
    _title_: 'Reports Dashboard'
  requirements:
    group: '\d+'
  options:
    parameters:
      group:
        type: entity:group
    _admin_route: true

If you visit /group/{group}/reports/dashboard, the breadcrumbs will be:
The name of the group > The name of the group

Instead the breadcrumbs should be:
The name of the group > Reports Dashboard

This is because the current code finds type: entity:* and incorrectly assumes the route absolutely must be an entity canonical route.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

maskedjellybean created an issue.

maskedjellybean’s picture

I was going to open an MR but actually this appears to be fixed in 2.x dev. Was it fixed accidentally or on purpose I wonder?

maskedjellybean’s picture

To be clear this broken in the 2.0.5 release but fixed in the 2.x dev branch (at least as of this comment).