I love this module. I have it on every site i have ever done since Drupal 4.7. Other than the odd issue a few years back with the poorly parented Views menu items in the Structure menu; i have never had issues. But, as luck would have it; i have taken over a project which sadly is a mess of the work of at least 5 other devs. One of the more annoying issues with the site is that the admin menu is messed up. Not only does it have the old Views menu items out of place, but i actually have items missing as well. And now, trying to fix this by resetting 1 of the missing items, clearing cache, etc... i now have managed to get the entire Structure menu disappearing. Truly the menu from hell.

I disabled and uninstalled the module, deleted module folder and added lastest dev. Nothing helps. I assume this is more an issue with internal menu structure than with admin menu; but hoping some way to rebuild whatever it is that is messed up and get this working.


liquidcms created an issue. See original summary.

liquidcms’s picture

Title: Why is my admin menu so messed up? » Admin Menu needs a rebuild feature.
Category: Support request » Feature request

omg!! and after months of putting up with this mess.. and finally posting a case about it.. 5 mins later its fixed.. lol


so frustrated with the admin menu and unable to work with the Structure menu missing i resorted to trying the Admin module; which i have seen many times before but never liked it as much as Admin Menu. I could see with Admin that Structure menu was still a little wonky; even though it did show up with Admin. But.. i did see that Admin module has a rebuild function. figured it couldnt hurt. Sure enough it fixes everything... Views items, missing menu items for other modules, missing Structure menu.. everything. And not just within Admin but with Admin Menu as well.

So, i'll change this to a feature request; Admin Menu should have whatever Admin module has to do a rebuild.

RedEight’s picture

Are you referring to the "Wipe and rebuild" button that Admin provides? As far as I can tell, it completely wipes the management menu and then triggers the menu rebuild.

from the Admin module file admin.admin.inc line 193

 * Wipe and rebuild the admin menu.
function admin_settings_rebuild_submit($form, &$form_state) {
    ->condition('menu_name', 'management')
  if (module_exists('block')) {
    cache_clear_all('admin', 'cache_block', TRUE);

Is the issue that the menu_rebuild() function isn't actually updating those poorly parented menu items and leaving them in their "weird" state. Obviously the code inside that function can be ran using drush or devel's run php code option if you don't want to install Admin. I've had the weird views menu items sitting at the top of my Structure dropdown for months and it's driving me crazy.

afireintheattic’s picture

Yes! I've been dealing with a similar issue on three of my multisites, and it's been driving me INSANE having a bunch of un-nested admin menu items. Installed Admin and ran a rebuild and it's good as new with zero effort. Thank you so much for pointing this out, liquidcms!

liquidcms’s picture

@redeight, the code you posted above does the trick. thanks.

donapis’s picture

Hi all,

How to use code #3?

veroniqueg’s picture

Thanks it did it for me too

il you have the devel module, go to your_site/devel/php
paste the code and execute

donapis’s picture

I rarely use the devel module, but i'll give it a try. Thanks for the input.