Opened 9 years ago
Closed 9 years ago
#35895 closed defect (bug) (fixed)
Widgets and Nav Menus components produce errors if user only has customize capability
Reported by: | westonruter | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Customize | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
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).
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
In 36611: