Posted by codybarr on January 2, 2009 at 2:51pm
Jump to:
| Project: | Node breadcrumb |
| Version: | 6.x-1.0-beta5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When the the Node Breadcrumb and Admin Menu Module are enabled at the same time the following code is printed at the top of the user login page (example.com/user):
[code]
1 / 0 ![]()
[/code]
Here is the link to the related issue for Admin Menu: http://drupal.org/node/279767
Attached is a screenshot.
| Attachment | Size |
|---|---|
| userlogin.png | 18.22 KB |
Comments
#1
Sorry:
1 / 0 <img src="/sites/godbyte.com/modules/admin_menu/images/icon_users.png" width="16" height="15" alt="Current anonymous / authenticated users" title="Current anonymous / authenticated users" />#2
Is this fixed yet or what?
#3
No, this problem still persists.
#4
Changing the node_breadcrumb_init function as shown below (based on patch at http://drupal.org/node/303247#comment-1310764) _seems_ to work, but I've not tested extensively, hence no actual patch. Also, this doesn't make any attempt to make the changes configurable, since I just needed it working, not looking pretty!
function node_breadcrumb_init() {
drupal_add_css(drupal_get_path('module', 'node_breadcrumb') .'/node_breadcrumb.css');
$ignored_menus = array('admin_menu', 'devel');
$menu_item = menu_get_item();
$result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = '%s'", $menu_item['href']);
while($mlid = db_result($result)) {
$menu_link = menu_link_load($mlid);
// @see http://www.php.net/manual/en/function.in-array.php#86695
if (!in_array($menu_link['menu_name'], $ignored_menus, TRUE)) {
menu_set_active_menu_name($menu_link['menu_name']);
break;
}
}
// menu_set_active_menu_name(db_result(db_query("select menu_name from {menu_links} where link_path='%s'", $menu_item['href'])));
}
#5
I changed menu breadcrumb (problem is in there too) in its menu sql to exclude names containing 'admin_menu'.
Fixed it wonderfully.
This should be added into the module!
#6
Was having the same issue, but applying #4 fixed the problem ;)
#7
Seeing same problem - changed line 59 of node_breadcrumb.module from
<?phpmenu_set_active_menu_name(db_result(db_query("select menu_name from {menu_links} where link_path='%s'", $menu_item['href'])));
?>
to
<?phpmenu_set_active_menu_name(db_result(db_query("select menu_name from {menu_links} where menu_name != 'admin_menu' AND link_path='%s'", $menu_item['href'])));
?>
Worked for me.
Peter
#8
thanks Peter
thats fixed it for me too
:)
#9
just confirming this is still a problem - it seemed like the beta5 release had fixed it, at first, but then there were other problems with that release, and moving to 1.x-dev solved the other stuff but brought this problem back. the patches described above work fine in the meantime.
#10
fixed in beta6
// 6.x-1.x-dev is very old, don't use it
#11
Automatically closed -- issue fixed for 2 weeks with no activity.