Download & Extend

Set module weight to less than zero?

Project:Menu Breadcrumb
Version:6.x-1.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I wish I could be more precise, but after some module upgrades, menu breadcrumb stopped working for me. I was depending on m_bc in php block visibility as well as for the breadcrumbs. After figuring out that m_bc was running about in the middle of all calls to menu_set_active_menu_name(), I lowered the weight to -100 and all was well.

So, not much info there, but I'm just wondering if this is something anyone else has encountered.

Comments

#1

Without knowing what else you are running, or exactly what "stopped working" means, it's hard to advise on this.

If you want to track down the conflicting module, take note that where weights are equal, hooks are invoked on modules according to their position in the "system" database table, when sorted by "filename" (which is the full path, relative to drupal root). Assuming you put all your modules directly under sites/all/modules/ (*), the culprit is most likely a contrib module with a name 'lower' than "menu_breadcrumb", which gives you a smaller list to test against (although it sounds like you already knew that, or perhaps generated a more detailed sequence of events?).

(*) Note also that you are free to organise your modules within arbitrary further subdirectories, which can then affect the system table sort order without touching the menu weights. (For example, modules under sites/all/modules/custom/ would have their hooks invoked after the modules under sites/all/modules/contrib/

#2

Thats good to know about sub-directory weighting. I wasn't aware of that.

By stopped working, I mean the active menu was not set in time to use it for the breadcrumb, and the crumbs were all being built from the navigation menu, so the result was Home > Node Title.

nobody click here