Closed (outdated)
Project:
Admin
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Nov 2009 at 12:11 UTC
Updated:
29 Oct 2025 at 15:29 UTC
Jump to comment: Most recent
Hello!
Sometimes menu items in admin menu disappears, and I have nailed it down to the admin_landing_page_access function. The problem is that on line 56 you are fetching a menu item based on router_path but I believe link_path would be the right condition. The reason is the next query search for children and when using router_path the item found could be a children in itself.
After changing line 56 from:
$item = db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $path));
to:
$item = db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.link_path = '%s' AND module = 'system'", $path));
everything starts to function normal again.
Comments
Comment #1
mnlund commentedThis applies to the 2.x version as well. Don't know if it is the right fix but I'm getting all the parent items. Any comments on this?
Comment #2
yhahn commentedThanks for tracking this down, will look at this after the holiday break : )
Comment #3
askibinski commentedI can confirm that this fixed my missing menu items/access denied in 1.0-beta3.
Comment #4
yhahn commentedThank you. Committed http://drupal.org/cvs?commit=296614
Comment #6
micahw156This fix got committed to admin-6.x-2.x but was never back-ported to 6.x-1.x. Please see #722146: Structure menu item or entire admin menu system sometimes disappear. for a discussion of the same change to the 1.x branch.
Comment #7
achtonActually, the commit referenced by yhahn in #4 only fixed half of the issue - the OP noted the first half, yhahn only committed the second half to 6.x-2.x. Se the commit diff for further info.
I can confirm that altering that line as noted in #0 fixes this issue.
Comment #8
sickness29 commentedDevelopment or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.
Everyone can apply the patch above (not tested by the maintainers, tested by the community) to their D6 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!