[wp-trac] [WordPress Trac] #38714: Taxonomy meta boxes do not work right with Custom Post Types that use custom capabilities

WordPress Trac noreply at wordpress.org
Tue Nov 8 18:42:32 UTC 2016


#38714: Taxonomy meta boxes do not work right with Custom Post Types that use
custom capabilities
-----------------------------+-----------------------------
 Reporter:  bcworkz          |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Role/Capability  |    Version:  trunk
 Severity:  normal           |   Keywords:
  Focuses:  administration   |
-----------------------------+-----------------------------
 Category and tag taxonomies have the capability required for
 "assign_terms" set to "edit_posts", as in the global
 `$wp_taxonomies['category']->cap->assign_terms` for example. This becomes
 a problem with custom post types that define a custom capabilities array
 specifying a different edit capability and the usual "edit_posts"
 capability for particular roles is removed, though they have the proper
 edit CPT capability. Then the corresponding meta box on the CPT edit
 screen is not properly interactive.

 For example, I create a CPT called "Contributions" and map the
 "edit_posts" capability to "edit_contributions". I also create a
 "Contributor" role that has all the expected capabilities for
 Contributions posts, including "edit_contributions" This role does not
 have the usual "edit_posts" and other default post and page capabilities,
 other than "read". The role also has "manage_categories" capability.

 When logged in as a user with only the Contributor role, when I go to the
 edit contributions screen, I can see the categories meta box, but cannot
 assign any terms to the current contributions post. The checkboxes are
 inactive. Similarly for tags, I can see the tags meta box, but it has no
 content.

 This issue was brought up in this forums post:
 https://wordpress.org/support/topic/custom-post-type-with-categories-and-
 tags-checkbox-disabled/

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


More information about the wp-trac mailing list