[wp-trac] [WordPress Trac] #63059: JS Warning in navigation menus when removing an item
WordPress Trac
noreply at wordpress.org
Wed Mar 5 17:13:27 UTC 2025
#63059: JS Warning in navigation menus when removing an item
--------------------------+-------------------------
Reporter: joedolson | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.7.3
Component: Menus | Version: 6.7
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript
--------------------------+-------------------------
Comment (by abcd95):
Hi @joedolson and thanks for reporting this issue.
I think the problem occurs because, in `nav-menu.js`, the code is
incorrectly calling the `updateParentDropdown()` and
`updateOrderDropdown()` methods on the menus object (which is just a
localization object with UI strings) instead of on the proper jQuery
object.
See here -
The fix is straightforward - we need to call these methods on the menu
container jQuery object `($('#menu-to-edit'))`
I'll submit a PR with this fix shortly which in my testing resolves the
console errors.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63059#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list