[wp-trac] [WordPress Trac] #53452: [WP 5.8 beta 2] $_POST['sidebar'] is missing when saving a widget
WordPress Trac
noreply at wordpress.org
Sun Jun 20 20:00:30 UTC 2021
#53452: [WP 5.8 beta 2] $_POST['sidebar'] is missing when saving a widget
--------------------------+---------------------------------------
Reporter: strategio | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.8
Component: Widgets | Version: trunk
Severity: critical | Resolution:
Keywords: has-patch | Focuses: administration, rest-api
--------------------------+---------------------------------------
Comment (by strategio):
Replying to [comment:3 spacedmonkey]:
> Why is this data needed? If it needed, then there is other data is
missing. See this example.
In our case, we have widgets that needs to know the assigned sidebar in
order to set the initial settings. But there's no form element for our
widget, the settings UI is shown in another place.
So to be honest, I didn't pay attention to the other form data, but I
believe it should be passed to the superglobal to keep WP 5.8 backward
compatible with legacy widget.
For the 'sidebar', I believe it's legit to expose this information
somewhere because `\WP_Widget::update` is called from
`\WP_REST_Widgets_Controller::save_widget` which has this information as
the second argument.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53452#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list