Make WordPress Core

Opened 5 years ago

Last modified 20 months ago

#53520 new enhancement

Add regression test for the wp_option data corruption bug

Reported by: fullofcaffeine Owned by:
Priority: normal Milestone: Future Release
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses: administration

Description

Gutenberg v10.7.x introduced a bug that caused some wp_options to get blank or corrupted data after (any) settings were updated in the options-general.php page. This was eventually fixed in v10.7.4, with this PR: ​https://github.com/WordPress/gutenberg/releases/v10.7.4. See ​https://github.com/Automattic/wp-calypso/issues/53447 and ​https://github.com/Automattic/wp-calypso/issues/53431.

There's already a regression E2E test in Gutenberg that was introduced in this PR: ttps://github.com/WordPress/gutenberg/pull/32797. Ideally, though, it'd be either moved to WP core or also implemented here. It doesn't need to be an E2E test, and could be a lower-level integration test, if we can figure out how to reproduce at a lower level (there was a failed attempt to do this, though, see this comment: ​https://github.com/WordPress/gutenberg/pull/32797#issuecomment-865005516.

Change History (5)

This ticket was mentioned in ​Slack in #core by peterwilsoncc. ​View the logs.


5 years ago

#2 @peterwilsoncc
5 years ago

  • Component General → Build/Test Tools
  • Milestone Awaiting Review → 5.9

#3 @hellofromTonya
5 years ago

  • Milestone 5.9 → Future Release

Today is 5.9 Feature Freeze. I'll punt this to Future Release (as 6.0 isn't
available yet for selection).

Test and build tool changes are allowed after feature freeze up until RC. If someone is able to work on this before then, it can always be moved back.

#4 @johnbillion
5 years ago

  • Keywords needs-unit-tests added

This ticket was mentioned in ​PR #8301 on ​WordPress/wordpress-develop by ​@abcd95.


20 months ago
#5

  • Keywords has-patch has-unit-tests added; needs-unit-tests removed

Trac ticket: 53520

This PR adds a regression test for the bug fixed in Gutenberg v10.7.4 where updating options in options-general.php would corrupt theme-related wp_options.

The bug caused themes to break and revert to default themes after updating any setting in the Settings or Customizer pages. This was tracked in wp-calypso issues #53447 and #53431 and fixed in Gutenberg PR #32797.

This test ensures that updating an unrelated option doesn't corrupt theme-related options like 'stylesheet' and 'template', preventing this serious issue from recurring in the future.

See: ​https://github.com/WordPress/gutenberg/pull/32797

Note: See TracTickets for help on using tickets.