WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 6 months ago

#25214 new defect (bug)

Behaviour when deleting menu items with sub-menus

Reported by: johnbillion Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Menus Keywords: ux-feedback needs-patch
Focuses: administration Cc:

Description

If you delete a menu item that has sub-menu items below it, the sub-menu items will move up a level instead of being deleted. I don't think this is desired behaviour for menus. If I delete a menu I expect it to delete all its sub-menus too.

Additionally, the "sub item" labels on sub-menus are not removed as they should be when they're moved up a level, which adds to the confusion (see attached screenshots).

Attachments (2)

Screen Shot 2013-09-02 at 12.48.47.png (19.2 KB) - added by johnbillion 5 years ago.
Before screenshot
Screen Shot 2013-09-02 at 12.48.58.png (16.8 KB) - added by johnbillion 5 years ago.
After screenshot

Download all attachments as: .zip

Change History (15)

@johnbillion
5 years ago

Before screenshot

@johnbillion
5 years ago

After screenshot

#1 follow-up: @DrewAPicture
5 years ago

I believe the desired behavior is to delete that one menu item and nothing more. The answer would be the same if we were talking about pages or even categories too.

As for removing the 'sub item' label when sub-menu items shift down to top-level, that seems like a legitimate bug we should fix.

Last edited 5 years ago by DrewAPicture (previous) (diff)

#2 @DaveAl
5 years ago

While looking at this, I noticed a couple of other things that I think are worth mentioning.

Although maybe it's intentional, if you add a new page and set it's parent attribute, it shows up on the menu page in the "Most Recent" tab correctly under it's parent, but when you add it to the menu, it's inserted at the same level as it's parent, with no "sub item" label. Furthermore, if you click on the "Under [Parent] Page" link, nothing happens unless you save the menu first.

Nothing major, but rather counter-intuitive - it took a few tries for me to figure out that's how it works. It seems to me that:

  1. The new item should be inserted at the next level under it's parent by default and -
  2. You should be able to move the item before saving it the first time.
Last edited 5 years ago by DaveAl (previous) (diff)

#3 @mordauk
5 years ago

I'm not sure if there is a related ticket opened for it, but I'd consider this to be the same kind of odd behavior that we see when adding multiple pages to a menu. Say you select three pages to add and two of them are child pages of he first. You'd expect all three pages to be added as a hierarchy (the second and third being set as sub menu items of the first), but instead they all get added as top level menu items.

#4 @chriscct7
3 years ago

  • Focuses administration added
  • Keywords needs-patch added

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


20 months ago

#6 @karmatosed
20 months ago

  • Milestone changed from Awaiting Review to 4.9

I agree that this is an issue and would suggest it was fixed for 4.9.

#7 @JoshuaWold
20 months ago

If you delete a menu item that has sub-menu items below it, the sub-menu items will move up a level instead of being deleted.

I've validated that this behavior is happening in Customizer, WordPress 4.8. GIF of the current process:

https://cldup.com/HCksvEwt-6.gif

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


17 months ago

#9 in reply to: ↑ 1 @Travel_girl
17 months ago

I think if you delete the parent menu item, the subitems should not be delete automatically, but should get a level higher and not being a submenu anymore.

If you add multiple pages, where you have a parent page and child pages, it would be a nice behavior, if the hierarchy would also be automatically in the menu, because you add them together.

I'm not so sure, about that same behavior, if you add the child-page alone and not together with the parent page. It could be confusing, that the menu item jumps in a spot, on its own.

#10 @johnbillion
17 months ago

  • Milestone changed from 4.9 to Future Release

This ticket was mentioned in Slack in #design by boemedia. View the logs.


6 months ago

#12 @wesselvandenberg
6 months ago

Maybe it is an option to give the users the option to decide if they want to keep their submenu items and/or if they want to assign them to an other menu item.

#13 @boemedia
6 months ago

We discussed this ticket today at Nijmegen and we think deleting submenu-items by default is not recommended and probably too confusing for the user. Therefore we suggest maybe adding a tick box where people can choose to include/exclude submenu items on deletion.

Note: See TracTickets for help on using tickets.