Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#55438 new defect (bug)

Flaky result when saving widgets in the Widgets Editor

Reported by: kevin940726's profile kevin940726 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Widgets Keywords:
Focuses: rest-api Cc:

Description

I discovered this while trying to migrate the 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.

Attachments (1)

widgets.har (1.1 MB) - added by kevin940726 2 years ago.
HAR file of the process when saving the widgets

Download all attachments as: .zip

Change History (2)

@kevin940726
2 years ago

HAR file of the process when saving the widgets

Note: See TracTickets for help on using tickets.