[wp-trac] [WordPress Trac] #37478: Customizer undefined property if widget area before/after values are empty

WordPress Trac noreply at wordpress.org
Tue Jul 26 22:10:24 UTC 2016


#37478: Customizer undefined property if widget area before/after values are empty
--------------------------+-----------------------------
 Reporter:  Clorith       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 Introduced in r37322 the replace on `widgetClasses` casts a TypeError if
 all the `before_widget`, `after_widget`, `before_title` and `after_title`
 fields are declared as an empty string in a theme when registering a
 widget area through `register_sidebar`

 A quick example registration;
 {{{#!php
 <?php
 register_sidebar( array(
         'name'          => __( 'Sidebar' ),
         'id'            => 'sidebar-1',
         'before_widget' => '',
         'after_widget'  => '',
         'before_title'  => '',
         'after_title'   => '',
 ) );
 }}}


 As reported by @stevengliebe in https://wordpress.org/support/topic
 /customizer-js-error-when-register_sidebar-beforeafter-arguments-empty

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


More information about the wp-trac mailing list