in Drupal 6:
Array › Array › breadcrumb for stories categorised by taxonomy
and only Home > in uncategorised stories
In Drupal5 breadcrumb is Ok, in Drupal 6 is not
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | orz99_taxonomy_menu.png | 2.82 KB | yelban |
| #10 | orz99_taxonomy_menu_BEFORE.png | 2.11 KB | yelban |
Comments
Comment #1
keith.smith commentedI can't quite parse this bug report. Can you elaborate?
Regardless, a breadcrumb issue is surely not critical.
Comment #2
zet commented- In admin/build/menu/settings i have :
When a go to display a story node, the breadcrumb shows Array > Array
I tested this on Zen, Garland, and Internet Center themes for Drupal6
For the same steps like above, in Drupal5 the breadcrumb is ok. Here, when i display a node , the breadcrumb is : Vocab > Term
Comment #3
catchMoving to taxonomy menu.
Comment #4
zet commentedis anyone who does not get this breadrumb error in Drupal 6 with taxonomy menu ?
Comment #5
MatthijsG commentedSubscribing.
Want to know how to get rid of "Array » Array »"
Comment #6
ecuadorbob commentedI have the same problem:
http://localhost/drupal6/taxonomy/term/10 gives me the breadcrumb I want...
http://localhost/drupal6/node/2 (a node with the term #10) gives me 'Array › Array'
This is definitely a bug,
Comment #7
zet commentedActualy I'm not sure if this a taxonomy menu issue.
Can someone confirm if the breadcrumb menu is showing without problems on drupal 6 an tell what extra modules they have installed
Comment #8
TSE commentedHard to say, if tax menu is disabled the path shown in breadcrumb is only "Home".
So i would thing its not a taxonomy menu issue, cause the path isn't shown without it anyway. Looks more this module dont get the right variables so it displays array.
For me it looks more like a drupal core issue.
Greetz TSE
Comment #9
yelban commentedI got same problem, too.
need help!
Comment #10
yelban commentedI have edit the taxonomy_menu.inc and got the breadcrumb work at node view,
just chang the drupal_set_breadcrumb() statement in taxonomy_menu.inc line: 230
before: attachment 2
after: attachment 1
Comment #11
TSE commentedHi yelban, good work this fixes the problem !
Many thX TSE
offtopic : since this looks like a patch to the problem i set the status to patch (code needs review), hope this is ok ?
Comment #12
AndyW commentedcheers yelban, works fine
Comment #13
yelban commentedHi TSE
sure, that's okay you change the status to any type. ^^
thXs a lot for the good module :)
Comment #14
Aethuriel commentedThank you, yelban!
Although the patch worked, I had the Custom Breadcrumbs module to also deal with --
So the patch actually helped me realize I could comment OUT whole c. line 230 "if" statement (including your patch) in order to let the Custom Breadcrumbs module do its magic. Taxonomy menu was overriding my Custom Breadcrumbs settings whether it was Array >> Array or categories as per your patch.
Comment #15
kinky69 commentedHi, it dont work with my theme (marinelli). The code in taxonomy_menu.inc is different:
// Generate the entire breadcumb
foreach ($tree as $term) {
if ($term->depth <= $old_depth) {
$slashes_to_remove = $old_depth - $term->depth + 1;
for ($i = 0; $i < $slashes_to_remove; $i++) {
$old_path = substr($old_path, 0, strrpos($old_path, "/"));
}
}
$path = $old_path .'/'. $term->tid;
$old_depth = $term->depth;
$old_path = $path;
// When we reach the term that this node uses,
// set the breadcumb
if ($term->tid == $vocab[0]) {
drupal_set_breadcrumb(array(
array('path' => $path, 'title' => t($term->name)),
array('path' => 'node/'. $node->nid, 'title' => $node->title)
));
// Quit after the first match.
return;
}
}
}
}
Is there anything i can dohere too ???
Comment #16
tf5_bassist commentedI've had the breadcrumbs working just fine so far, but then I log in today, and there was an update for Pathauto AND the Drupify theme... after updating these, I'm getting the Array > Array breadcrumbs showing up. Definitely not critical, but annoying for sure.
Edit: When editing the story, the breadcrumbs show up properly. Could this instead be an issue with the new Drupify snapshot?
Comment #17
drq commentedThanks. I have this problem too. Tomorrow check that hack.
Comment #18
tf5_bassist commentedGood stuff, working so far.
Notes: When Viewing a story, breadcrumbs show taxonomy term the story belongs to, and then the name of the story. when Tracking or Editing, it shows Home instead of the term. And even if it's a nested term (Home > Social Networking > Twitter > Article name), it only will show Twitter > Article Name.
this an issue, or a normalcy of Drupal?
Comment #19
ninelives commentedBased on the comments by yelban in post #10 I've been able to get my breadcrumb working mostly the way I expect with pathauto by using this code. I'll like to extend this to do recursive vocab, but for now I'm happy.
Comment #20
tf5_bassist commentedSo, after switching over from Drupify to Marinelli, still having this problem... With or without Yelban's fix (which worked in Drupify). Anyone have any thoughts or ideas?
Comment #21
lentreprenaute commentedHi all,
I create new content type with CCK, I met the same problem....
i created a taxomany hierarchy. like (directory my new content) : vocabulary1> term1> term2.
So from the home page if i click on the title, i have "array array", when i click on taxonomy term, it's work fine.
So i'm newbie, not fluent in english... Hope you understand and helping you.
Working on the basic template which come with the first install...
Florent
Comment #22
zet commentedComment #23
anikey commentedif ($term->tid == $vocab[0]) {
drupal_set_breadcrumb(array(
/*array('path' => $path, 'title' => t($term->name))*/
l(t($term->name), $path),
/*array('path' => 'node/'. $node->nid, 'title' => $node->title)*/
l($node->title, 'node/'. $node->nid)
));
// Quit after the first match.
return;
}
it's works
Comment #24
chrissearle commented#23 confirmed here.
Comment #25
pathogen commentedconfirmed as well.. the Array > Array issue is gone
I am noticing some inconsistencies with the breadcrumbs though, but anything is better than array array!
Comment #26
Anonymous (not verified) commentedJust want to confirm #23 works for me, too
I wonder if it's okay to just place an HTML link there, as that would make it more difficult for other modules to handle the breadcrumbs.
Comment #27
tf5_bassist commentedEh, didn't work for me on D6.3. I don't know what my problem is haha... I tried the fix in #23, I'm running Marinelli, I've tried a fix in Marinelli, I've tried disabling other modules, and i'm either getting "Node Name/Node Name" without any plugins, or "Array/Node Name" with modules running.
Comment #28
dthiessen commentedSame problem here...
Subscribing
Comment #29
rainer_f commented#10 works great for me with Pushbutton Theme. Hope it stays in any tax menu updates!
Comment #30
yngens commented#23 solves array > array issue, but when you press on the term name (http://mysite.org/category/5/23), generated by l(t($term->name), $path) it gives:
Going to 'category/5/23's alias by pathauto '/rubrics/culture' properly opens the page. I wonder how can I make $path in 'l(t($term->name), $path)' to link to path's alias, not $path itself?
Comment #31
petertj commentedsubscribing...
Comment #32
xanga2008 commentedSubscribing..
Comment #33
manan commentedWhere is taxonomy_menu.inc?
Comment #34
mntoner commentedI am using Drupal 6.4 with pushbutton theme. Please can someone tell me how to fix the breadcrumb for the primary menu. Thanks
Comment #35
rimma commentedsame issue here. Subscribing..
Comment #36
Afief commentedFixed in head. You can checkout the latest HEAD or try the Drupal6-dev version when it gets packaged tomorrow morning.
Note: the fix is a bit more extensive than what was posted here so even if you applied the patches mentioned here you might wanna try it out.
Comment #37
chrissearle commentedDev version confirmed for me.
It's changed which vocab it picks from compared to the hacked version from here - but - it is picking up a vocab and term :)
I guess it picks the lightest weight vocab and the lightest weight term from that vocab (if more than one term is applied)?
Comment #38
Afief commentedThat's true. The lightest term from the lightest vocabulary that has has an active menu(set in the taxonomy module configuration page)
I know this isn't exactly optimal(it doesn't care about other terms, or terms with multiple parents...etc) but I see no way to get around this as each page should have only one path defined when it's in the menu. Any suggestions are more than welcome.
Comment #39
chrissearle commentedNo - I agree - I couldn't see a better solution there
Comment #40
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.