[wp-trac] [WordPress Trac] #35895: Widgets and Nav Menus components produce errors if user only has customize capability

WordPress Trac noreply at wordpress.org
Sun Feb 21 06:54:45 UTC 2016


#35895: Widgets and Nav Menus components produce errors if user only has customize
capability
--------------------------+-----------------
 Reporter:  westonruter   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.5
Component:  Customize     |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------
 In #28605, a `customize` capability was introduced to allow a plugin to
 grant users (e.g. subscribers) access to the Customizer without having to
 grant all `edit_theme_options`. However, the Widgets and Nav Menus
 components currently are not fully taking this into account, resulting in
 errors when objects are not present as expected

 There is a PHP notice:

 > Notice:  Trying to get property of non-object in .../wp-includes/class-
 wp-customize-nav-menus.php on line 368

 And a JS error:

 > Uncaught TypeError: Cannot read property 'bind' of undefined in
 customize-preview-widgets.js

 Relates to having discrete capabilities for editing nav menus (#29213) and
 widgets (#31020).

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


More information about the wp-trac mailing list