WordPress.org

Make WordPress Core

Opened 23 months ago

Closed 19 months ago

Last modified 17 months ago

#18340 closed defect (bug) (fixed)

Quickedit on Spam Comments adds approve and unapprove

Reported by: hebbet Owned by: ryan
Priority: normal Milestone: 3.3
Component: Administration Version: 3.1
Severity: normal Keywords: has-patch commit
Cc: mike.schroder@…

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 23 months ago.
18340.patch (820 bytes) - added by ocean90 23 months ago.
18340.noEdit.diff (1.1 KB) - added by DH-Shredder 20 months ago.
Removes Edit+Quick Edit from Spam'd posts
18340.noEdit.2.diff (2.2 KB) - added by DH-Shredder 20 months ago.
Remove nested if & add check for editcomment/spam in wp-admin/comment.php

Download all attachments as: .zip

Change History (21)

hebbet23 months ago

comment:1 ocean9023 months 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 ocean9023 months 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.

ocean9023 months ago

comment:3 ocean9023 months ago

  • Keywords has-patch added; needs-patch removed

comment:4 azaozz23 months 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: hebbet23 months 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 azaozz23 months ago

Replying to hebbet:

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

  • Unspam.
  • Edit the comment.

comment:7 follow-up: ocean9023 months 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 azaozz23 months 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 ocean9023 months 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 jane21 months 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-Shredder20 months ago

Removes Edit+Quick Edit from Spam'd posts

comment:11 DH-Shredder20 months ago

  • Cc mike.schroder@… added

Attached patch removes Edit+Quick Edit from posts in Spam

comment:12 nacin20 months ago

  • Keywords commit added

So both patches here need to go in?

comment:13 DH-Shredder20 months 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-Shredder20 months ago

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

comment:14 DH-Shredder20 months ago

Tested & refreshed patch.

comment:15 ryan19 months 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 nacin17 months 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.