[wp-trac] [WordPress Trac] #44286: Feature Request: Provide Menu Settings on create new menu
WordPress Trac
noreply at wordpress.org
Thu Feb 28 06:19:53 UTC 2019
#44286: Feature Request: Provide Menu Settings on create new menu
-------------------------------------------+------------------------------
Reporter: garrett-eclipse | Owner: audrasjb
Type: enhancement | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version:
Severity: normal | Resolution:
Keywords: has-screenshots needs-refresh | Focuses: administration
-------------------------------------------+------------------------------
Changes (by garrett-eclipse):
* keywords: has-screenshots good-first-bug has-patch needs-testing => has-
screenshots needs-refresh
Comment:
Thanks for the patch @ianjvr
I successfully applied against trunk and testing everything seemed to be
working until I tried to break it... and by that I mean I tried to save a
second menu with the same title as an existing one. In this one
circumstance, an issue presents itself in that the failed save updated the
database option for theme_mods_twentynineteen to set the
nav_menu_locations I'd had selected 'social' against an id of 0;
`a:2:{s:18:"custom_css_post_id";i:-1;s:18:"nav_menu_locations";a:2:{s:6:"menu-1";i:4;s:6:"social";i:0;}}`
With this set against id 0 when you go to create an additional menu we are
presented with pre-selected menu location(s).
[[Image(https://core.trac.wordpress.org/attachment/ticket/44286/Screen%20Shot%202019-02-27%20at%209.57.14%20PM.png)]]
I believe the issue here lies in this code which occurs before the menu
title is checked for error.
https://github.com/WordPress/WordPress/blob/master/wp-admin/nav-
menus.php#L295-L309
The other tests I did worked nicely they entailed;
1. Creating a menu.
2. Creating a menu w/ auto-add.
3. Creating a menu w/ location(s)
4. Creating a menu w/ both auto-add and location(s)
*Between these tests I reloaded and attempted the location tests with
different ones individually and multiples as well.
The only other pause I had while testing was after creating my first menu
and going to create my second I wanted to go back but in this case where
there's only one existing menu the dropdown select doesn't appear so one
either needed to reload or use the sidebar navigation. Due to this I
opened (46367) to suggest adding a Cancel to the Create Menu screen.
Nice work on the patch, and let me know if I can clarify or assist in any
way.
Cheers
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44286#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list