reverted: --- b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php +++ a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php @@ -17,7 +17,7 @@ * * @var array */ + public static $modules = array('menu_test'); - public static $modules = array('menu_test', 'views'); protected $profile = 'standard'; @@ -309,7 +309,7 @@ $this->drupalPost("node/{$parent->nid}/edit", $edit, t('Save')); // Put both terms into a hierarchy Drupal ยป Breadcrumbs. Required for both + // the menu links and the terms itself, since taxonomy_term_page() resets - // the menu links and the terms itself, since the taxonomy term page resets // the breadcrumb based on taxonomy term hierarchy. $parent_tid = 0; foreach ($tags as $name => $null) { @@ -365,7 +365,7 @@ $this->assertTrue(count($elements) == 1, "Link to {$link['link_path']} appears only once."); // Next iteration should expect this tag as parent link. + // Note: Term name, not link name, due to taxonomy_term_page(). - // Note: Term name, not link name, due to the taxonomy term page. $trail += array( $link['link_path'] => $term->name, ); diff -u b/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc --- b/core/modules/taxonomy/taxonomy.views.inc +++ b/core/modules/taxonomy/taxonomy.views.inc @@ -479,18 +479,18 @@ * Helper function to set a breadcrumb for taxonomy. + * + * @param array &$breadcrumb + * An array reference containing a reference to $view->build_info['breadcrumb']. + * @param \Drupal\views\Plugin\views\argument\ArgumentPluginBase $argument + * The argument handler instance to get the argument from. + * */ function views_taxonomy_set_breadcrumb(&$breadcrumb, &$argument) { - if (empty($argument->options['set_breadcrumb'])) { - return; - } - - $args = $argument->view->args; - $parents = taxonomy_term_load_parents($argument->argument); - - foreach (array_reverse($parents) as $parent) { - $parent = array_shift($parents); - - $path = $parent->uri(); - $path = $path['path']; - $breadcrumb[$path] = check_plain($parent->label()); + $breadcrumb = array(); + $current = taxonomy_term_load($argument->argument); + while ($parents = taxonomy_term_load_parents($current->id())) { + $current = array_shift($parents); + $uri = $current->uri(); + $breadcrumb[$uri['path']] = $current->label(); } + $breadcrumb = array_reverse($breadcrumb); } only in patch2: unchanged: --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1752,7 +1752,9 @@ public function getBreadcrumb($set = FALSE) { if ($set) { if ($base) { - $breadcrumb = array_merge(drupal_get_breadcrumb(), $breadcrumb); + // Just add the frontpage (so the first item of the breadcrumbs). + $existing_breadcrumb = drupal_get_breadcrumb(); + $breadcrumb = array_merge(array($existing_breadcrumb[0]), $breadcrumb); } drupal_set_breadcrumb($breadcrumb); }