[wp-trac] [WordPress Trac] #62925: Non-unique names for inputs in nav-menu
WordPress Trac
noreply at wordpress.org
Sun Feb 9 07:53:51 UTC 2025
#62925: Non-unique names for inputs in nav-menu
--------------------------+-----------------------------
Reporter: kkmuffme | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version:
Severity: major | Keywords:
Focuses: |
--------------------------+-----------------------------
/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],...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62925>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list