[wp-trac] [WordPress Trac] #48890: Twenty Twenty: Customizer Controls Uncaught Errors

WordPress Trac noreply at wordpress.org
Thu Dec 5 22:59:26 UTC 2019


#48890: Twenty Twenty: Customizer Controls Uncaught Errors
---------------------------+---------------------------------------
 Reporter:  fmixell        |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:  5.3
 Severity:  normal         |   Keywords:  has-patch has-screenshots
  Focuses:  javascript     |
---------------------------+---------------------------------------
 I noticed that the customizer.js file in the Twenty Twenty theme is
 loading in the customizer no matter if the theme is being edited or if a
 plugin is using the customizer. When using any plugin that takes advantage
 of the customizer you will see the attached type error.

 Offending Code:
 {{{
 api.control( 'accent_hue_active' )
 }}}

 Uncaught TypeError: Cannot read property 'setting' of undefined. That's
 because plugins are loading their settings.

 So far I've seen this cause issues with the jQuery UI Slider controls,
 they just won't load. Switching back to the TwentyNineteen theme or
 TwentySeventeen theme resolved the issue.

 Adding a try catch block around this twenty twenty setting specific code
 solves the problem for me. Try catch is fully supported now so I think
 this could be a great, minimal code, solution to this bug.

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


More information about the wp-trac mailing list