24 March 2014

Sometimes menu gets messed up and all the new links go on the admin menus first level. Or you have other reasons to rebuild menu. You also need devel module to do this.

Source code viewer
  1. // Run delete menu links.
  2. $num_deleted = db_delete('menu_links')
  3. ->condition('module', 'system')
  4. ->execute();
Programming Language: PHP
Run devel/menu/reset.
Clear cache and you are done.