[wp-trac] [WordPress Trac] #33187: Menu becomes empty after saving in WordPress 4.2.3
WordPress Trac
noreply at wordpress.org
Tue Aug 11 14:53:39 UTC 2015
#33187: Menu becomes empty after saving in WordPress 4.2.3
-------------------------------------+-----------------------------
Reporter: jcexygy | Owner: boonebgorges
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.3
Component: Taxonomy | Version: 4.2
Severity: major | Resolution:
Keywords: has-patch needs-testing | Focuses: administration
-------------------------------------+-----------------------------
Changes (by boonebgorges):
* keywords: => has-patch needs-testing
* severity: normal => major
Comment:
jcexygy - Thanks very much for the report.
When we built the term-splitting logic in 4.2, we accounted for terms
associated with specific nav items, but we totally missed the 'nav_menu'
terms themselves.
Two fixes are required to make it work. See [attachment:33187.diff] and
associated tests:
1. `wp_update_nav_menu_object()` returns the ID of the menu term, and that
ID is used to perform other updates (like updating the associated nav
items). Previously, the ID passed to the function was being blindly
returned, regardless of what was returned by the internal call to
`wp_update_term()`. 33187.diff fixes this, and modifies wp-admin/nav-
menus.php so that it redirects to a correct URL (?menu=123) if the
nav_menu ID changes.
2. When a nav_menu term is split, the corresponding entries in
'nav_menu_locations' must be changed. See
`_wp_check_split_nav_menu_terms()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33187#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list