[wp-trac] [WordPress Trac] #31501: Customizer Save race condition when attempting to publish too soon after updating widget form fields with multiple edits
WordPress Trac
noreply at wordpress.org
Mon Mar 2 09:51:15 UTC 2015
#31501: Customizer Save race condition when attempting to publish too soon after
updating widget form fields with multiple edits
--------------------------+-------------------------
Reporter: westonruter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1.2
Component: Customize | Version: 3.9
Severity: normal | Resolution:
Keywords: | Focuses: javascript
--------------------------+-------------------------
Description changed by westonruter:
Old description:
> On a slow connection or if a widget update callback takes any amount of
> processing time complete, multiple edits to one or more form fields will
> have multiple simultaneous `update_widget` Ajax requests open at a time.
> The last one to return would have the winning instance data to supply for
> the widget form: a race condition. Before an update widget request is
> kicked off, any previous request should be aborted so that only the last
> user-submitted data is used in the form instance.
New description:
On a slow connection or if a widget update callback takes any amount of
processing time complete, multiple edits to one or more form fields will
have multiple simultaneous `update_widget` Ajax requests open at a time.
The last one to return would have the winning instance data to supply for
the widget form: a race condition. Before an update widget request is
kicked off, any previous request should be aborted so that only the last
user-submitted data is used in the form instance.
Additionally, when invoking the Customizer Save functionality, it needs to
hold off on gathering up the {{customized}} data to POST to the server
until the {{processing}} state is cleared-out; right now it is incorrectly
obtaining the data to send before any widgets have finished processing to
get their settings from the server over Ajax.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31501#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list