[wp-trac] [WordPress Trac] #36208: Comment queries should ignore comments associated with non-active custom post types

WordPress Trac noreply at wordpress.org
Thu Nov 10 23:14:32 UTC 2022


#36208: Comment queries should ignore comments associated with non-active custom
post types
-------------------------------------------------+-------------------------
 Reporter:  Clorith                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Comments                             |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  bulk-reopened has-patch has-unit-    |     Focuses:
  tests                                          |  administration
-------------------------------------------------+-------------------------

Comment (by imath):

 Hi @techjewel you're very welcome 👍.

 If your PR is the selected fix, I'll be very happy.

 I've added an alternative approach a bit similar to the one @chriscct7
 shared above.

 If removing the "unregistered post type" comments from the comments query
 is pretty straightforward, imho it's looking like a developer's way of
 dealing with the problem. It's probably a very efficient way (simple is
 beautiful) but, even if I may overthink this issue, I'm not feeling
 comfortable about "hiding" some information/content from the site's
 administrator because it simply generates doing it wrong notices.

 I believe an admin should be able to at least remove these comments or
 keep them and eventually reactivate the plugin registering the post type.

 I hope this will be solved soon 👋

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


More information about the wp-trac mailing list