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

WordPress Trac noreply at wordpress.org
Fri Aug 28 14:08:41 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 SergeyBiryukov):

 Replying to [comment:44 nofearinc]:
 > Attached is a safer (in my opinion) workaround that doesn't touch the
 capabilities and runs the comment query against the available post types
 (`get_post_types()`).

 [attachment:16956.7.diff] uses the same fix on Comments screen.

 Note that this approach means that orphaned comments won't be displayed
 anywhere in the admin.

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


More information about the wp-trac mailing list