[wp-trac] [WordPress Trac] #39451: Javascript error when link_manager_enabled ( WP_Widget_Links) and theme supports customize-selective-refresh-widgets

WordPress Trac noreply at wordpress.org
Tue Jan 3 17:45:31 UTC 2017


#39451: Javascript error when link_manager_enabled ( WP_Widget_Links) and theme
supports customize-selective-refresh-widgets
--------------------------+-----------------------------
 Reporter:  nikeo         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 The error occurs in the customizer when a user uses the `WP_Widget_Links`
 widget has enabled support for `customize-selective-refresh-widgets`.

 The `WP_Widget_Links` is now deprecated, but it is retro-compatible if
 user had it already installed.

 The error message in the browser js console looks like this :


 {{{
 customize-preview-widgets.js?ver=4.7:63 Uncaught Error: Illegal id for
 widget partial.
     at child.initialize (customize-preview-widgets.js?ver=4.7:63)
     at child.api.Class (customize-base.js?ver=4.7:93)
     at child [as constructor] (customize-base.js?ver=4.7:34)
     at new child (customize-base.js?ver=4.7:34)
     at HTMLDivElement.<anonymous> (customize-selective-
 refresh.js?ver=4.7:863)
     at Function.each (jquery.js?ver=1.12.4:2)
     at jQuery.fn.init.each (jquery.js?ver=1.12.4:2)
     at Object.wp.customize.selectiveRefresh.self.addPartials (customize-
 selective-refresh.js?ver=4.7:850)
     at Function.<anonymous> (customize-selective-refresh.js?ver=4.7:961)
     at i (jquery.js?ver=1.12.4:2)
 }}}

 Theme or plugin developers can fix the problem by removing the support for
 `customize-selective-refresh-widgets` if `link_manager_enabled` is set to
 true. But a core fix would be better of course.

 Temporary solution :


 {{{
 if ( ! get_option( 'link_manager_enabled' ) ) {
    add_theme_support( 'customize-selective-refresh-widgets' );
 }
 }}}

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


More information about the wp-trac mailing list