When I activate the module, this breaks the breadcrumb.

Only the title of the current page "Page 2" is displayed instead of "Home -> Page 1 -> Page 2"

Comments

justindodge’s picture

I am having a similar issue but noted that it seems to occur only when menu_breadcrumb.module is turned on. I'm still investigating...

justindodge’s picture

So I think this is related to race conditions that are occurring in hook_init. A similar report occurs on the menu_breadcrumb side (not specifically related to this module though) #1503344: Breadcrumb fires at init, doesn't display/gets overwritten by Ubercart catalog, and potentially others. (patch included).

I was able to overcome this issue by adjusting the module's weighting in the system table.
By default,
menu_views - 100
menu_breadcrumb - 0

By setting the weight of menu_views to -1, it's menu_views_init function was able to execute before menu_breadcrumb_init and the problem was resolved.

This change in weighting didn't seem to have any adverse effects on my menu views, but I imagine there must have been some logic involved in initially setting the weight of the module to 100 to begin with that I'm unaware of.

markhalliwell’s picture

If I'm not mistaken, I threw in a module weight that exceeded http://drupal.org/project/menu_attributes which has a weight of 10 in light of a form issue that menu_attribute has (see #1415140: Not working with Menu attributes). In retrospect, perhaps seeing that there seems to be a lot of modules that don't implementing certain alters properly. I should change this module's weight to -1. This way, if there are issues, then the issue lies with the other contrib modules.

oscardax’s picture

I get a similar issue with Menu Breadcrumb and Menu Views, and can only solve it partially:
my breadcrumb is displayed as a single character "»", instead of "home » option 2 » suboption 2.3"

Following directions from justindodge in #2 http://drupal.org/node/1535524#comment-5952388 and clearing the cache afterwards, I get the breadcrumb to display "home » suboption 2.3", therefore missing the middle-bit of the breadcrumb: " » option 2 » " .

Menu
--option 1
--option 2
---- suboption 2.1
---- suboption 2.2
---- suboption 2.3

slashrsm’s picture

I am experiencing the same issue together with special_menu_items module. Adjusting weight to -1 does help.

special_menu_items also implement hook_init() to do some of their magic on breadcrumbs.

sylus’s picture

Same issue here using the panopoly distribution with a custom built megamenu. Setting the weight to -1 fixed the problem. Would it be possible to switch the weight to -1 in dev as previously discussed or were there other regressions?

Ndesign’s picture

I also have the same issue. going in to the system table did not work when I changed the weight to -1. Furthermore, i get an error when I add a node to the menu and breaks my breadcrumb to: home > Array > Name of Node).
the error is below:
any suggestions or solutions is much appreciated

Notice: Array to string conversion in token_replace() (line 102 of /var/www/hosts/pro-drupal/includes/token.inc).

markhalliwell’s picture

Version: 7.x-1.3 » 7.x-2.x-dev
Status: Active » Fixed

Unfortunately the 1.x branch is just not feasible to fix this bug. It's part of the reason I am creating the 2.x branch and stopping support for the 1.x branch.

I will be releasing a 7.x-2.0-beta1 here in just a bit.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.