Incorrect vocabulary used by module when choosing term for breadcrumb. In comments to source code it says "Only consider terms in the lightest vocabulary" which makes sense, but in the same time code select VID of first term attached to node. And this is not always the same as lightest vocabulary. Simple patch attached.
---
--- taxonomy_breadcrumb.inc.orig 2010-11-17 12:12:27.000000000 -0600
+++ taxonomy_breadcrumb.inc 2010-11-17 12:21:46.000000000 -0600
@@ -47,9 +47,10 @@
$terms = taxonomy_node_get_terms($node);
if (!empty($terms)) {
if (count($terms) > 1) {
+ $vocs = taxonomy_get_vocabularies();
foreach ($terms as $term) {
// Only consider terms in the lightest vocabulary.
- if (!isset($vid)) {
+ if (!isset($vid) or $vocs[$vid]->weight > $vocs[$term->vid]->weight) {
$vid = $term->vid;
}
elseif ($term->vid != $vid) continue;
| Comment | File | Size | Author |
|---|---|---|---|
| taxonomy_breadcrumb.inc_.patch | 588 bytes | pavel.karoukin |
Comments
Comment #1
skizzo commentedConfirming: I had multiple vocabularies and the "wrong one" was picked by Taxonomy Breadcrumb.
Above patch fixed the problem. Thank you.
Comment #2
Chinasky314 commentedI have aplied the patch and doesnt change..... I have even changed the vid in the data bases and is still not working.... Please some help... I dont find anything in google...
Comment #3
gisleThe Drupal 6 version is no longer supported. Closing this as outdated. If you think this is still relevant for Drupal 7 or Drupal 9, please open a new issue.
Comment #4
gisle