[wp-trac] [WordPress Trac] #50730: _wpCustomizeSettings has invalid data for starter-content widgets

WordPress Trac noreply at wordpress.org
Tue Jul 21 21:52:09 UTC 2020

#50730: _wpCustomizeSettings has invalid data for starter-content widgets
 Reporter:  alshakero     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  5.4.2
 Severity:  normal        |   Keywords:  has-patch 2nd-opinion
  Focuses:                |
 Copying from https://github.com/WordPress/gutenberg/issues/20827.

   When Gutenberg is installed, and a site is set to "fresh", error
 messages are shown in the customizer for widgets included in a theme's
 starter content. The site with the starter content can not be published
 until the widgets are edited. In my tests, changing the widget title or
 content removed the error.

   It does not seem to be theme dependent, I tested different themes that
 includes starter content. It's reproducible on 5.4.2.

 **To reproduce**
 Steps to reproduce the behavior:

 1. Create a new WordPress site or reset an existing install
 2. Activate Gutenberg
 3. Activate a theme with starter content, for example Twenty Twenty or
 Twenty Seventeen.
 4. Go to the Customizer.
 5. Press Publish
 6. See the error: Unable to save due to 2 invalid settings.

 **Expected behavior**
 I expect the starter content to be saved without errors.

 **Additional info**
 I investigated the forementioned GitHub issue and it seems that
 `_wpCustomizeSettings` has invalid widget data when customizer is used on
 a fresh site with starter content. By invalid, I mean it fails the check
 in [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-
 wp-customize-manager.php#L2359 this line].

 I'll send a PR on GitHub.

Ticket URL: <https://core.trac.wordpress.org/ticket/50730>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list