Closed (fixed)
Project:
Menu Views
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2012 at 14:21 UTC
Updated:
24 Oct 2012 at 22:01 UTC
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
Comment #1
justindodge commentedI am having a similar issue but noted that it seems to occur only when menu_breadcrumb.module is turned on. I'm still investigating...
Comment #2
justindodge commentedSo 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.
Comment #3
markhalliwellIf 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.
Comment #4
oscardax commentedI 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
Comment #5
slashrsm commentedI 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.
Comment #6
sylus commentedSame 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?
Comment #7
Ndesign commentedI 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).Comment #8
markhalliwellUnfortunately 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.