Opened 7 weeks ago
Last modified 5 weeks ago
#62925 accepted defect (bug)
Non-unique names for inputs in nav-menu
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-patch |
Focuses: | Cc: |
Description
/wp-admin/nav-menus.php
e.g. in the
<form id="nav-menu-meta" class="nav-menu-meta" method="post" enctype="multipart/form-data">
If there are custom menus (e.g. WooCommerce) but possibly also only with native ones, it's possible that there are multiple different input with identical name= which will cause issues on form submit/processing.
e.g.
<input type="hidden" class="menu-item-title" name="menu-item[-1][menu-item-title]" value="Some Text"/>
I have multiple elements in the navigation that all have "menu-item[-1][menu-item-title]" as name (starting from -1 all the way up to -133 which is the number of elements in the navigation)
Also affects other elements like menu-item[-1][menu-item-url],...
Change History (3)
Note: See
TracTickets for help on using
tickets.
This PR fixes an issue where custom menu items in the WordPress navigation menu were being generated with duplicate input names, causing potential form submission and processing issues.
Trac ticket: https://core.trac.wordpress.org/ticket/62925