[wp-trac] [WordPress Trac] #41007: Custom_Image_Header::customize_set_last_used() blocking customizer save response from coming through

WordPress Trac noreply at wordpress.org
Mon Jun 12 11:29:55 UTC 2017


#41007: Custom_Image_Header::customize_set_last_used() blocking customizer save
response from coming through
--------------------------+-----------------------------
 Reporter:  Collizo4sky   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  4.7.5
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 At my company, we are building a plugin that requires resetting the
 customizer to a blank slate. using the code in
 [https://make.xwp.co/2016/09/11/resetting-the-customizer-to-a-blank-slate/
 this tutorial] by @westonruter

 When we try to save changes in customizer, we got the error below

 {{{
 [12-Jun-2017 11:06:39 UTC] PHP Fatal error:  Uncaught Error: Call to a
 member function post_value() on null in
 /home/vagrant/Code/WordPress/public/wp-admin/custom-header.php:1324
 Stack trace:
 #0 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(298):
 Custom_Image_Header->customize_set_last_used(Object(WP_Customize_Manager))
 #1 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(323):
 WP_Hook->apply_filters(NULL, Array)
 #2 /home/vagrant/Code/WordPress/public/wp-includes/plugin.php(453):
 WP_Hook->do_action(Array)
 #3 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-customize-
 manager.php(2739): do_action('customize_save_...',
 Object(WP_Customize_Manager))
 #4 /home/vagrant/Code/WordPress/public/wp-includes/theme.php(2870):
 WP_Customize_Manager->_publish_changeset_values(4106)
 #5 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(298):
 _wp_customize_publish_changeset('publish', 'new', Object(WP_Post))
 #6 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(323):
 WP_Hook->apply_filters(NULL, Arr in /home/vagrant/Code/WordPress/public
 /wp-admin/custom-header.php on line 1324
 }}}

 The submitted patch fixes this issue by making sure
 `$wp_customize->get_setting( 'header_image_data' )` return an instance of
 `WP_Customize_Setting`

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


More information about the wp-trac mailing list