[wp-trac] [WordPress Trac] #37826: Can't manage comments of trashed posts

WordPress Trac noreply at wordpress.org
Wed Oct 5 14:34:41 UTC 2016


#37826: Can't manage comments of trashed posts
-------------------------------------------------+-------------------------
 Reporter:  swissspidy                           |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Comments                             |  Release
 Severity:  normal                               |     Version:
 Keywords:  has-screenshots good-first-bug has-  |  Resolution:
  patch                                          |     Focuses:
-------------------------------------------------+-------------------------

Comment (by stevenlinx):

 @swissspidy

 I know you propose making the link of the "comments bubble" under the
 "trashed" subtab of the "Post" tab leading to a html table that merely
 displays the comments and no buttons for editing each comment.

 I acknowledge the patch is different from what you've proposed and I could
 have commented first (After I realized what the problem was, I did the
 patch and submitted too quickly).

 When I was evaluating the problem, I concluded that your proposal was
 based on the wrong assumption. Even if it were correct, it can't be
 trivially fixed (possibly need further discussion on a separate ticket).

 Your assumption was based on the fact that you clicked the link on the
 "comments bubble" and the resulting page didn't give you the table that
 you expected, but the core issue is that the "comments bubble" is not
 supposed to be linked in the first place. You can deduce this design
 decision from the fact that the post title of a trashed post is currently
 not linked (this was tested on the latest v4.6.1).

 The bug was caused by `comments_bubble()` function not taking into account
 that "trashed" posts are not suppose to have hyperlinks. The current code
 in comments_bubble() simply displays html based on the number of approved
 comments available, irrespective whether the post in question is already
 trashed.

 1)
 All properties of a trashed post should be read-only. This was
 acknowledged by a previous commenter, as akin to a trashed file in the
 recycle bin of a desktop OS.

 2)
 If you try to create a test post, add a few comments, and trash the post.
 Then, go direct to the "Comments" tab on the left panel of WP Admin (which
 loads "edit-comments.php" page), you'll discover the comments you've just
 added is not displayed anywhere.

 On the "edit-comments.php" page, if a post is trashed, then its properties
 such as comments will not show. By design, the "edit-comments.php" page
 only displays the "trashed" comments of "active" posts, and not "trashed"
 posts.

 If you go to the "Post" tab, then the "trashed" subtab, and click on the
 "comments bubble", it loads the same "edit-comments.php" file.

 Hence, if you propose to display "trashed" comments of "trashed" posts,
 you'll be changing the intended role of "edit-comments.php" page. Not to
 mention you'll have to change how the buttons are displayed, so they're
 not hyperlinked.

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


More information about the wp-trac mailing list