
Sometimes it happens your Drupal 7 administration menu gets scrambled. This may be caused by some nasty modules, or like in my case it was inherited from MySQL crash in Drupal 6 version of a site.
Of course you can use Devel module which has a menu rebuild link in its block. But if you don't have Devel module installed, don't worry, it is easy and safe enough to fix menu manually in Drupal 7:
- Delete you current links via SQL
DELETE FROM menu_links WHERE menu_name='management'
. - Clear all caches at Administration > Configuration > Development (or just: http://example.com/admin/config/development/performance if your menu is ruined at this point). Drush users can of curse use
drush cc all
or evendrush cc menu
The consequences: your administration (management) menu is reset to defaults. If you had any custom links attached to it (or menus created in views, etc.), they were moved to navigation menu now.
If you want to script it:
echo "DELETE FROM menu_links WHERE menu_name='management'" | drush sql-cli
drush cc menu
Thank you so much! I spent a lot of time to find the solution for demaged Administration menu!