The context_condition_menu::execute() method may set the active menu before inspecting the active menu trail: if the active menu is 'navigation' (the default one) it tries to determine the actual one by looking up the current menu item's href in the {menu_links} table. While doing this it does not take into account the possibility that more than one menu has a link for the current menu item, AAMOF the query has no order by clause. This leads to an arbitrary menu selection when more than one link is available.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | context-909148-1.patch | 673 bytes | plach |
Comments
Comment #1
plachThe attached patch introduces an
'ORDER BY mlid ASC'clause to the query to give priority to menus having the older items.Comment #2
shawn_smiley commentedI think this is a duplicate of issue #901606: Incorrect breadcrumbs when using menu contexts with the admin menu module, or at least the patch modifies the same code as the other issue.
Comment #3
plachYes, this is a duplicate. IMO this approach should be evaluated too so I'll repost the patch in the other issue.