[wp-trac] [WordPress Trac] #51947: When Customizer `setup_theme` action fails during wp-settings.php, WordPress crashes due to missing global $wp_locale

WordPress Trac noreply at wordpress.org
Thu Dec 10 16:02:26 UTC 2020


#51947: When Customizer `setup_theme` action fails during wp-settings.php,
WordPress crashes due to missing global $wp_locale
--------------------------+---------------------
 Reporter:  Guss77        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.7
Component:  Customize     |     Version:  4.6
 Severity:  major         |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------
Changes (by dlh):

 * keywords:  reporter-feedback => needs-patch
 * version:   => 4.6
 * milestone:  Awaiting Review => 5.7


Comment:

 No need for the list of plugins, @Guss77. I can replicate simply by
 enqueuing the datepicker on `wp_enqueue_scripts`, since
 `WP_Customize_Manager` invokes it before exiting:
 https://github.com/WordPress/wordpress-
 develop/blob/668581d0f3be00c0babe6929f97ecce654507843/src/wp-includes
 /class-wp-customize-manager.php#L454

 Moving the timing of `setup_theme` is going to be a non-starter for
 backwards-compatibility concerns, I suspect, but the I18N or theme
 component maintainers might have ideas for doing so. Adding safety checks
 to `wp_localize_jquery_ui_datepicker()` might be a less-risky approach.
 Let's see whether we can work something out in 5.7.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51947#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list