breadcrumb hierarchy not shown

Created on 12 July 2025, 15 days ago

Problem/Motivation

Since the version 3.3.12 the hierarchy is not shown in the breadcrumb, only the default breadcrumb.
I am using theme zeropoint.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code (module)

Created by

πŸ‡³πŸ‡±Netherlands promes

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

Comments & Activities

  • Issue created by @promes
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Can you provide some more information?

    What are the URLs you're using?
    Are you using the entity hierarchy breadcrumb sub-module?
    Are you using any other breadcrumb modules?

    Not a lot to go on here sorry

  • πŸ‡³πŸ‡±Netherlands promes

    I tested also with Claro: same result.
    I am using the entity hierarchy breadcrumb sub-module.
    I have only one node type using breadcrumps: the entity hierarchy breadcrumb. No other breadcrumps.
    In the blocks setting is only one breadcrump block present.
    In the settings of the breadcrump block I also allowed only the specific node type.
    The breadcrump only contains: Home.
    There are about 320 nodes of the specific node type. The current max depth is 12.
    Earlier the complete depth was shown.
    I use it for a family tree.
    The url's are derived from the node title.
    I deinstalled the entity hierarchy breadcrumb module and reinstalled it. No changes.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Are you able to debug \Drupal\entity_hierarchy_breadcrumb\HierarchyBasedBreadcrumbBuilder::applies to see if it is returning TRUE?

    Thanks

  • πŸ‡³πŸ‡±Netherlands promes

    This function is not entered at all. I placed \Drupal::logger(..) after entering and before each return. But none fired.
    I didn't find a place the enable this breadcrumb except for installing the module.

  • πŸ‡³πŸ‡±Netherlands promes

    Strange. I looked at some other nodes and sometimes it does put one or two levels deep in the breadcrumb (with return value TRUE). But many more levels should be shown.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    This function is not entered at all. I placed \Drupal::logger(..) after entering and before each return. But none fired.

    That seems to be like another breadcrumb builder is running before it.

    Do any of the modules you have feature

    tags:
     - { name: breadcrumb_builder, priority: $something_greater_than_10 }
    

    in their MODULENAME.services.yml file?

  • πŸ‡³πŸ‡±Netherlands promes

    I found this module:
    contrib/book/book.services.yml:6: - { name: breadcrumb_builder, priority: 701 }

    The book module has a recent update. Maybe that is the problem.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    It looks like that is gated behind the node-type being enabled for the book module. Are the impacted node-types part of a book?

  • πŸ‡³πŸ‡±Netherlands promes

    No, only other nodes are part of a book,
    Until the latest update of the book module (not part of Drupal) there was no problem.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Are you able to do the similar logging trick in the book module's breadcrumb builder and see if we can pinpoint if that module is returning 'true' from its applies method?

  • πŸ‡³πŸ‡±Netherlands promes

    I used \Drupal::logger in both modules to get the return values.
    If I request a node with a entity hyrarchy breadcrump I get a return value FALSE from the book module and TRUE from the entity hyrarchy breadcrump node.
    If I request a book node I don't get any return values.
    The book module has this code in applies():
    $cacheable_metadata?->addCacheContexts(['route.book_navigation']);
    $node = $route_match->getParameter('node');
    return $node instanceof NodeInterface && !empty($node->book);
    I hope this can help you.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    #12 sounds like we don't have any issues with other modules.

    The fact we're getting TRUE from the EH builder indicates it should be building the hierarchy.

    Is it possible your tree is corrupt? There's a drush command to rebuild it, but it will be empty whilst that is occurring, so it might be best to do that outside times where the site is under load.

  • πŸ‡³πŸ‡±Netherlands promes

    The rebuild with drush did the trick. It works now again.
    Thanks a lot.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Sweet

    V5 doesn't have that issue, if you're not using any custom code with the php API of some of the v3 services you could consider moving to v5

Production build 0.71.5 2024