[wp-trac] [WordPress Trac] #55438: Flaky result when saving widgets in the Widgets Editor
WordPress Trac
noreply at wordpress.org
Tue Mar 22 07:19:13 UTC 2022
#55438: Flaky result when saving widgets in the Widgets Editor
--------------------------+-----------------------------
Reporter: kevin940726 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version:
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
I discovered this while trying to migrate the
[https://github.com/WordPress/gutenberg/blob/3b1674a147c8e943b0d3727e0f4cbe379c2d9922/packages
/e2e-tests/specs/widgets/editing-widgets.test.js#L123-L233 editing-
widgets] e2e tests in Gutenberg. I think the test is currently skipped for
the same reason.
By un-skipping the test and running it several times, it sometimes fails
at the last step where the snapshot doesn't match. It mysteriously
contains a `wp_inactive_widgets: ''` field in the serialized result. I
think the bug is from a race condition in the REST API. I managed to
record a HAR file so that you can plug it in Chrome's devtools and inspect
it.
I'm not familiar with the PHP side of the code, but it seems like
sometimes a widget block won't be saved to the specified sidebar, and
instead be put inside `wp_inactive_widgets`.
Maybe someone with more knowledge around this can help debugging it? Sorry
that there's isn't a reliable reproduction steps though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55438>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list