When I enter a value for "Home breadcrumb text," it causes the normal breadcrumb (i.e. the breadcrumb on pages that are not tagged in the taxonomy) to disappear. However, if I leave "Home breadcrumb text" empty, the normal breadcrumb works as expected (including the Home link)... but then, obviously, I don't have a "Home" in my taxonomy breadcrumb anymore, so the two breadcrumb types look mismatched.

CommentFileSizeAuthor
#2 tax_crumb.patch795 bytesjenlampton

Comments

ryo’s picture

Almost same for me.
In my case, "Taxonomy Breadcrumb" seems to kill the breadcrumbs of "Book" when I enter a value for "Home" breadcrumb text.
And when I leave "Home" breadcrumb text empty, the normal "Book" breadcrumbs work as expected with "Home".

jenlampton’s picture

Assigned: Unassigned » jenlampton
Priority: Normal » Critical
StatusFileSize
new795 bytes

Same problem here. Every breadcrumb on my site was broken after an upgrade to 5.x-1.4. Deleting the home text restored the others, but now I'm missing my home links!

I see a few major problems with this code.

For starters taxonomy_breadcrumb_generate_breadcrumb() is being called when it shouldn't, from hook_nodeapi. hook_nodeapi is checking if the node is a full-page-view, but not if it's on a node/nid page. Here's what I changed to fix it: on taxonomy_breadcrumb.module, line 225 just add two more ands... change from this:

  if ($op == 'view' && $a4 && !drupal_is_front_page()) {

to this

  if ($op == 'view' && $a4 && !drupal_is_front_page() && (arg(0) == 'node') && is_numeric(arg(1))) {

Second, IN the code that's supposed to generate the new breadcrumbs... taxonomy_breadcrumb_generate_breadcrumb() there is a call to a function taxonomy_breadcrumb_get_vocabulary_path() which will ALWAYS return NULL because it's querying a database table that never gets anything saved into it. (weird?!)... Ok, so we'll never get a vocabulary breadcrumb, no biggie..

Third, we're having the same problem with taxonomy_breadcrumb_get_term_path() which queries an empty table, but in this case there is at least a default action if the result is NULL, so this isn't a big deal either. The module should still work as intended with this fix.

MGN’s picture

I believe this is already fixed in the 5.x-1.x-dev version (#225385: Wrong breadcrumb with view committed a couple of months ago). Can you test it out and see if it works for you ? I'd like to know if you see the same issue with the vocab breadcrumb...

5.x-1.4 is about two years old now and its time for another bugfix release. I just need more people to test the dev version to see if its ready...

Thanks for your help!

MGN’s picture

Status: Active » Closed (duplicate)

Marking as duplicate. Feel free to reopen if its still an issue.