[wp-trac] [WordPress Trac] #53816: Overview: Refactor the widgets read/write logic
WordPress Trac
noreply at wordpress.org
Fri Jun 6 12:04:59 UTC 2025
#53816: Overview: Refactor the widgets read/write logic
-------------------------------------------------+-------------------------
Reporter: zieladam | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future
| Release
Component: Widgets | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-docs | Focuses:
needs-dev-note needs-test-info |
-------------------------------------------------+-------------------------
Comment (by zieladam):
@SirLouen I don't remember the full context and I am not working on
widgets anymore. However, here are the bits that I do remember in case
that's helpful:
The original problem was a tricky race condition that moved widgets back
to inactive widgets when the user clicked save. We've worked around the
REST API issue by making sure requests are not sent in an order that
triggers the problem, but the root cause still exists and is likely to
bite the next person iterating on the widgets editor. Here's a breakdown
of the timing problem:
https://github.com/WordPress/gutenberg/issues/33335#issuecomment-879903958
I don't think we can solve the root cause without breaking backwards
compatibility, but we can at least help developers by renaming
"retrieve_widgets", which suggests data retrieval, to
"recover_lost_widgets", which clarifies it actually updates the database.
I'm not sure how to pidgeon-hole it. Technically, it's a refactor. At
heart, it's a communication/documentation improvement.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53816#comment:64>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list