[wp-trac] [WordPress Trac] #47983: Menus: Only send non-empty values on menu save on nav-menus.php
WordPress Trac
noreply at wordpress.org
Fri Sep 6 00:14:07 UTC 2019
#47983: Menus: Only send non-empty values on menu save on nav-menus.php
----------------------------+------------------------------
Reporter: metalandcoffee | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Changes (by SergeyBiryukov):
* component: General => Menus
Old description:
> In an effort to do some admin navigation menu customization (adding
> additional metaboxes/properties to individual menu items), I noticed that
> all menu properties (even ones that may be hidden due to "Screen
> Options") are being submitted to the server. And it actually began to
> cause the following PHP warning:
>
> {{{
> [05-Sep-2019 21:48:58 UTC] PHP Warning: Unknown: Input variables
> exceeded 1000. To increase the limit change max_input_vars in php.ini. in
> Unknown on line 0
> }}}
>
> Would it be better to make sure only menu properties that have been
> explicitly set are submitted to the server and saved to the database?
>
> When building a nav-menu and utilizing custom links the entered value
> isn't trimmed.
> Once you click 'Add to Menu':
> If you have whitespace at the start: no url added to the custom link in
> the menu item
> If you have whitespace at the end: %20 is added to the custom linkprevent
> PHP warning max_input_vars
New description:
In an effort to do some admin navigation menu customization (adding
additional metaboxes/properties to individual menu items), I noticed that
all menu properties (even ones that may be hidden due to "Screen Options")
are being submitted to the server. And it actually began to cause the
following PHP warning:
{{{
[05-Sep-2019 21:48:58 UTC] PHP Warning: Unknown: Input variables exceeded
1000. To increase the limit change max_input_vars in php.ini. in Unknown
on line 0
}}}
Would it be better to make sure only menu properties that have been
explicitly set are submitted to the server and saved to the database?
~~When building a nav-menu and utilizing custom links the entered value
isn't trimmed.
Once you click 'Add to Menu':
If you have whitespace at the start: no url added to the custom link in
the menu item
If you have whitespace at the end: %20 is added to the custom linkprevent
PHP warning max_input_vars~~
--
Comment:
Previously: #14134
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47983#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list