Problem/Motivation

When we use page_manager for override taxonomy term canonical page we have a bug with breadcrumbs.
For example we have term with name "Zero"
If we don't use page manager we have breadcrumbs "Home > Zero"
If we use page manager we have breadcrumbs "Home > Term view"
Seems this affected by https://www.drupal.org/node/2665328 and https://www.drupal.org/node/2820218

Proposed resolution

I propose add hack to module for term, until the time until page manager fixed the problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nabiyllin created an issue. See original summary.

r.nabiullin’s picture

r.nabiullin’s picture

It is temporary solution.

r.nabiullin’s picture

r.nabiullin’s picture

Status: Active » Closed (works as designed)
r.nabiullin’s picture

Status: Closed (works as designed) » Active
r.nabiullin’s picture

Issue still present. Rerolled patch for 1.6 version

Revathi.B’s picture

Here It was take your page manager title as breadcrumb. For example your page manager title as taxonomy page and the breadcrumb to be home --> taxonomy page.
easy Breadcrumb only work for when the alias is generated in alias table. Otherwise it wont work. Even the views page breadcrumb also not working.

Greg Boggs’s picture

I believe this a bug in page manager that's getting resolved in core. Feel free to use this patch until Page Manager is fixed!

Greg Boggs’s picture

Status: Active » Closed (works as designed)
Agogo’s picture

Just wanted to add that this patch is not working any more. The "hack" still does, though. It also works for nodes, for those that have issues also with Panel Pages for nodes. Might be useful for people.

I will not submit a patch since it will probably just stop working. Might be worth makin a local patch for your own project though so changes wont get lost when updating.

Find the file: src > EasyBreadcrumbBuilder.php
Find the function: getTitleString
Find the code: $title = $this->titleResolver->getTitle($route_request, $route_match->getRouteObject());
Replace it with:

    if (!empty($route_request->get('page_manager_page')) && $route_request->get('base_route_name') == 'entity.taxonomy_term.canonical') {
      $title = $this->entityRepository->getTranslationFromContext($route_request->get('taxonomy_term'))->label();
    }
    elseif (!empty($route_request->get('page_manager_page')) && $route_request->get('base_route_name') == 'entity.node.canonical') {
      $title = $this->entityRepository->getTranslationFromContext($route_request->get('node'))->label();
    }
    else {
     $title = $this->titleResolver->getTitle($route_request, $route_match->getRouteObject());
    }