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));

    $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.


Version:6.x-1.0-beta3» 6.x-2.x-dev

This 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?

Assigned:Unassigned» yhahn

Thanks for tracking this down, will look at this after the holiday break : )

I can confirm that this fixed my missing menu items/access denied in 1.0-beta3.

Status:Active» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

This 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.

Status:Closed (fixed)» Reviewed & tested by the community

Actually, 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.