While I was learning Drupal and designing my custom theme, I created a "Test Menu" (from /admin/menu/menu/add) and populated it with several menu items. Today I deleted the Test Menu (/admin/menu/item/delete/[id]), and my intuitive expectation was that its menu items would be deleted with it. Instead, the orphaned menu items "floated" into the main menu hierarchy in various places, depending on their weight and alphabetical rank.

This may or may not qualify as a bug, but I think most admins would not expect this behavior and under certain conditions might not even notice the orphaned menu items that suddenly appeared in the Navigation menu or elsewhere. At the very least, I think Drupal should warn the admin about what will happen. The current warning is...

Are you sure you want to delete the menu Test Menu?

This action cannot be undone.

We could add to the above something like, "IMPORTANT: Menu items that belong to this menu will NOT be deleted and may appear in other menus. Delete unwanted menu items before you delete this menu."

A better solution, IMO, would be that when the admin goes to delete a custom menu, s/he is given a choice to select a new parent menu (or no parent) for any menu items orphaned by the deletion, or for Drupal to delete them along with the menu.

Comments

kae’s picture

Title: Delete Menu does not warn about orphaned menu items » Thank you

Thank you for posting this warning. Your suggestion sounds like a good idea.
ae2005

Tobias Maier’s picture

Title: Thank you » Delete Menu does not warn about orphaned menu items

dont change the issues' title

and just a little sidenote:
if you want that this gets changed then look into the upcomming 4.7 (head) release if this is still an issue and then write a patch which helps all of us
thanks and merry x-mas

magico’s picture

Status: Active » Closed (fixed)