Postponed (maintainer needs more info)
Project:
Menu Trails
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2009 at 17:37 UTC
Updated:
23 Dec 2010 at 17:03 UTC
I've tested Menu Trails 1.0 and 1.x-dev with a clean Drupal 6.14, Drupal 6.15-cvs and 6.4. installation.
With 6.4. it worked - but the others didn't. Seems something got broke ...
I've just created a 'page' with a 'Primary Menu' entry and made all 'stories' to highlight it.
Can anybody confirm this?
Comments
Comment #1
perforator commentedComment #2
Rob T commentedThis one-line modification resolved a non-working issue for me in my 6.13 . Maybe this can help you?
http://drupal.org/node/547634
Comment #3
perforator commentedThx but it's still not working. I played around. Seems something broke (or is it my fault?) from 6.5. to 6.6. Maybe it's related to http://drupal.org/node/249571 which was fixed from 6.5 to 6.6 (http://drupal.org/node/324832).
Can anybody confirm this behaviour? Maybe I have a big think-o since I can assume that such a behaviour would have been recognized long ago ...
Comment #4
perforator commentedI've cycled back to the 6.5 implementation of
menu_navigation_linksin menu.inc and it worked. But only if the node does not have a menu entry in another menu ...Comment #5
sunI'm not able to replicate this issue. Please make sure you also test whether this issue still exists when using the latest versions/development snapshots of affected modules. If that does not help, then also try to temporarily disable potentially conflicting modules that may interfere with this functionality.
In any case, please report back about the status of this issue. Thanks.
Comment #6
Ruyman commentedIt also happens with drupal 6.19 and 6.20. When reverting menu_navigation_links to 6.5 version everything works. This is the function that works in includes/menu.inc :
function menu_navigation_links($menu_name, $level = 0) {
// Don't even bother querying the menu table if no menu is specified.
if (empty($menu_name)) {
return array();
}
// Get the menu hierarchy for the current page.
$tree = menu_tree_page_data($menu_name);
// Go down the active trail until the right level is reached.
while ($level-- > 0 && $tree) {
// Loop through the current level's items until we find one that is in trail.
while ($item = array_shift($tree)) {
if ($item['link']['in_active_trail']) {
// If the item is in the active trail, we continue in the subtree.
$tree = empty($item['below']) ? array() : $item['below'];
break;
}
}
}
// Create a single level of links.
$links = array();
foreach ($tree as $item) {
if (!$item['link']['hidden']) {
$l = $item['link']['localized_options'];
$l['href'] = $item['link']['href'];
$l['title'] = $item['link']['title'];
if ($item['link']['in_active_trail']) {
if (empty($l['attributes']['class'])) {
$l['attributes']['class'] = 'active-trail';
}
else {
$l['attributes']['class'] .= ' active-trail';
}
}
// Keyed with unique menu id to generate classes from theme_links().
$links['menu-'. $item['link']['mlid']] = $l;
}
}
return $links;
}