Make WordPress Core

Opened 4 years ago

Last modified 11 months ago

#36212 accepted defect (bug)

Empty menu items are deleted without warning

Reported by: cameronjonesweb Owned by: audrasjb
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Menus Keywords: has-patch needs-refresh
Focuses: ui, administration Cc:
PR Number:


I recently discovered that menu items with with an empty label are deleted from the menu upon save without any warning or notice. The particular situation was that I was adding a menu with an icon font for the items, so the labels were empty but had classes. Obviously a HTML comment can be used in this instance, but there should be some way to either communicate with the user that items with an empty label will be removed, disable saving of a menu with empty labels, or some way to handle empty labels without deleting the item.

Attachments (1)

36212.diff (715 bytes) - added by farookibrahim 2 years ago.

Download all attachments as: .zip

Change History (5)

#1 @obenland
4 years ago

  • Version trunk deleted

#2 @welcher
3 years ago

  • Keywords needs-patch added

Thanks for contributing to core! Would you like to propose a solution with a patch?

2 years ago

#3 @farookibrahim
2 years ago

  • Keywords has-patch added; needs-patch removed

#4 @audrasjb
11 months ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release
  • Owner set to audrasjb
  • Status changed from new to accepted

The patch doesn't applies cleanly anymore. Will need a refresh.

Moving to Future Realse as the solution proposed in the patch looks fine on my side.

Note: See TracTickets for help on using tickets.