Revolution: Bug when deleting the parent item in the "Menu" section

Created on 3 Apr 2019  ·  5Comments  ·  Source: modxcms/revolution

Bug report

Summary

If you delete the parent item in the menu, the child item is no longer displayed in the tree, but it is not deleted.
It will not be possible to create an item with the same name and it is in the list of parents.

menu-delete

menu-delete-2

When creating a new item, the last edited item is automatically assigned as a parent, even if it has been deleted and when saving item an error pops up that the parent is not found.

menu-delete-3

Environment

MODX 2.7.1
https://github.com/modxcms/revolution/issues/14220
https://github.com/modxcms/revolution/issues/14521

type-frontend bug

Most helpful comment

If a parent is removed, the children should be removed (with a warning). Otherwise it will be a lot of work to delete a whole tree. Moving items up is not a normal behavior for me.

All 5 comments

So, I've started work on it and faced with a problem. What to do with nested menus?
Somebody accidentally can remove top menu (even after confirming popup) and in case removing all menus will go away directly from a database, it can be painful to restore them from the database.
The second option - move a menu to the level of deleted.

Please, vote using emoji for this comment. 👍 for the removing, 👎 against removing that also means moving to the upper level.

If a parent is removed, the children should be removed (with a warning). Otherwise it will be a lot of work to delete a whole tree. Moving items up is not a normal behavior for me.

The 'next level' would be to have a marked-as-deleted for menu items from which they can be undeleted, but that would increase the scope a fair bit so I couldn't say if it would have much value in terms of value for users for the investment.

Maybe we could ask the users to move the items “up” or to another element?

Fixed in #14532

Was this page helpful?
0 / 5 - 0 ratings