WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#18340 closed defect (bug) (fixed)

Quickedit on Spam Comments adds approve and unapprove

Reported by: hebbet Owned by: ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.1
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

repro:

Get a spam

click on quick edit

hit update comment

see attached screenshot

(top: normal look - bottom: after updating comment)

Not sure if that is by design, but it looks a little bit strange

Attachments (4)

quickedit comment.png (5.6 KB) - added by hebbet 4 years ago.
18340.patch (820 bytes) - added by ocean90 4 years ago.
18340.noEdit.diff (1.1 KB) - added by DH-Shredder 3 years ago.
Removes Edit+Quick Edit from Spam'd posts
18340.noEdit.2.diff (2.2 KB) - added by DH-Shredder 3 years ago.
Remove nested if & add check for editcomment/spam in wp-admin/comment.php

Download all attachments as: .zip

Change History (21)

@hebbet4 years ago

comment:1 @ocean904 years ago

  • Keywords needs-patch added; dev-feedback removed
  • Milestone changed from Awaiting Review to 3.3

Confirmed.


Not sure if that is by design, but it looks a little bit strange.

No, it makes no sense.

comment:2 @ocean904 years ago

The problem is, that $comment_status is NULL, which is needed for this if clause.

In admin-ajax.php line 730 $comment_status will be defined but it isn't global.

@ocean904 years ago

comment:3 @ocean904 years ago

  • Keywords has-patch added; needs-patch removed

comment:4 @azaozz4 years ago

Perhaps the bug is having Quick Edit on spam. This makes no sense :) If a comment is not spam you should mark it as such before editing. If it is... why would you edit it?

comment:5 follow-up: @hebbet4 years ago

i use antispam bee (AB) and one of its features is adding a notice why it was added to spam. Like "[MARKED AS SPAM BY ANTISPAM BEE | CSS Hack]"

Another option is, that AB marks all non-german or non-english comments als spam. for that it uses google translate and sometimes it is wrong.

so i remove the notice with quick edit

comment:6 in reply to: ↑ 5 @azaozz4 years ago

Replying to hebbet:

Then your workflow for false positives (ham marked as spam) should be:

  • Unspam.
  • Edit the comment.

comment:7 follow-up: @ocean904 years ago

I don't think that the bug is to have Quick Edit on spam comments, it's also available for unapproved comments.

The bug exists since the new list table API.

comment:8 in reply to: ↑ 7 @azaozz4 years ago

Replying to ocean90:

IMHO spam comments are very similar to trashed comments. The only difference is that they were trashed automatically by a plugin or by matching a word, number of URLs, etc.

Unapproved comments are "undecided". That's why we have Edit and Approve as a combined editing action for them. This happens often in the workflow.

We should either extend the Edit and Approve to spam comments or completely remove editing there.

comment:9 @ocean904 years ago

IMO spam comments are very similar to unapproved comments. There aren't trashed, they only get as status spam. So I know it from most of the plugins. I must decide if it's really a spam comment or not.

If they are trashed automatically then no Quick Edit is possible, that's fine.

+1 for Edit and Approve ( or Unspam)

comment:10 @jane3 years ago

I would be down for removing Quick Edit from Spam. Making a clear distinction between spam and trash or not-yet-approved helps less savvy users. And if it's something that is to be edited, then it can be marked Not Spam and still left in moderation or put in trash.

@DH-Shredder3 years ago

Removes Edit+Quick Edit from Spam'd posts

comment:11 @DH-Shredder3 years ago

  • Cc mike.schroder@… added

Attached patch removes Edit+Quick Edit from posts in Spam

comment:12 @nacin3 years ago

  • Keywords commit added

So both patches here need to go in?

comment:13 @DH-Shredder3 years ago

Updated patch to reflect duck_'s suggestions in IRC.

The added error message in wp-admin/comment.php could use a check/suggestions, since I was unsure how to phrase marking a comment as "not spam", while still keeping the same basic structure as the error for editing Trash'd messages.

@DH-Shredder3 years ago

Remove nested if & add check for editcomment/spam in wp-admin/comment.php

comment:14 @DH-Shredder3 years ago

Tested & refreshed patch.

comment:15 @ryan3 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [19296]:

Don't show edit links for spam comments. Props DH-Shredder. fixes #18340

comment:17 @nacin3 years ago

In [19856]:

Allow comment.php?action=editcomment to be accessible for a comment that is spam. props josephscott, fixes #19977, see #18340.

Note: See TracTickets for help on using tickets.