No breadcrumb when a term on node is in excluded vocab, but another term is not

Created on 27 February 2013, over 12 years ago
Updated 18 July 2025, 26 days ago

Observed Symptom

No breadcrumb when a node had two terms, and one of the terms was in an excluded vocab.

Expected Behavior

Excluding a vocab at /admin/config/user-interface/custom-breadcrumbs excludes all terms in that vocab for consideration in breadcrumb.

Actual Behavior

All terms are still loaded for consideration. Only further down the chain is the excluded vocab list considered, and if selected term is from excluded vocab, no breadcrumb is generated.

Reason

$term returned from custom_breadcrumbs_taxonomy_node_get_term() in custom_breadcrumbs_taxonomy_node_view() was an excluded term. This resulted in custom_breadcrumbs_taxonomy_generate_breadcrumb() not generating a breadcrumb trail because of term is in an excluded vocab (line 262).

Suggested solution

Exclude terms in excluded vocabs in the db query inside custom_breadcrumbs_taxonomy_node_get_terms(), way before they are considered further downstream. This way, only good candidates are ever passed down. This solution fixes my observed symptom because another term that isn't excluded gets to be used for the breadcrumb.

πŸ› Bug report
Status

Closed: outdated

Component

custom_breadcrumbs_taxonomy

Created by

πŸ‡ΊπŸ‡ΈUnited States pianomansam

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

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