WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#13138 closed defect (bug) (fixed)

Show warning if the menu name already exists

Reported by: ocean90 Owned by: filosofo
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords: needs-patch
Focuses: Cc:

Description

At the moment you get a warning:

Notice: Trying to get property of non-object in H:\xampplite\htdocs\wp\wp-admin\nav-menus.php  on line 208

and a wrong message, because it hasn't been created.

The  menu has been successfully created.

Attachments (4)

do_not_allow_menus_of_same_name.13138.diff (4.9 KB) - added by filosofo 4 years ago.
do_not_allow_menus_of_same_name.2.13138.diff (4.9 KB) - added by filosofo 4 years ago.
make_warning_use_menu_name_slug.13138.diff (8.9 KB) - added by filosofo 4 years ago.
make_warning_use_menu_name_slug.2.13138.diff (8.9 KB) - added by filosofo 4 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 ocean904 years ago

There is somethink similar:

Create a menu with name 1 and a menu with name 2, after that change the name of 2 to 1. The name of menu 2 should be now 1.

If you change the name, you should also get this warning:

Notice: Undefined index: menu-item-db-id in H:\xampplite\htdocs\wp\wp-admin\nav-menus.php  on line 232

comment:2 ocean904 years ago

  • Keywords needs-patch added

Not as Cc...

comment:3 ocean904 years ago

  • Cc ocean90@… added
Notice: Undefined index: menu-item-db-id in H:\xampplite\htdocs\wp\wp-admin\nav-menus.php  on line 232

You get this message, if the menu doesn't have any items.

comment:4 filosofo4 years ago

  • Status changed from new to accepted

comment:5 nacin4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [14283]) More nav menu fixes. props filosofo. see #13148. fixes #13155, fixes #13157, fixes #13138, see #13134.

comment:6 ocean904 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

see #comment:1 and #comment:3

comment:7 nacin4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [14285]) Fix handling of nav menu search, also menu naming conflicts. props filosofo, fixes #13138

Note: See TracTickets for help on using tickets.