[wp-trac] [WordPress Trac] #16956: Comments Being Pulled from Non-Existent Post Types

WordPress Trac noreply at wordpress.org
Sat Aug 29 20:18:23 UTC 2015


#16956: Comments Being Pulled from Non-Existent Post Types
-------------------------------------------------+-------------------------
 Reporter:  sterlo                               |       Owner:
     Type:  defect (bug)                         |  boonebgorges
 Priority:  normal                               |      Status:  reviewing
Component:  Posts, Post Types                    |   Milestone:  4.4
 Severity:  normal                               |     Version:  3.1
 Keywords:  has-patch 2nd-opinion needs-unit-    |  Resolution:
  tests                                          |     Focuses:
-------------------------------------------------+-------------------------

Comment (by boonebgorges):

 Replying to [comment:46 SergeyBiryukov]:
 > Note that this approach means that orphaned comments won't be displayed
 anywhere in the admin.

 Yeah. In contrast, the current state of affairs is that they're
 *displayed*, but they can't be edited, because the cap checks always fail
 - except in the case of a super admin on multisite, when they always pass
 :-/. Hiding them altogether seems like an improvement.

 Just to throw out another possible caps-based solution that might be a
 compromise. When mapping caps for 'edit_comment' etc, if the post type
 object is not found, map onto 'edit_others_posts'. This is more
 restrictive than simply mapping to 'edit_posts', but still allows the
 content to be managed by highly privileged users. See
 [attachment:16956.8.diff].

--
Ticket URL: <https://core.trac.wordpress.org/ticket/16956#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list