Can't delete a comment that's been marked as spam if it has replies

Description

Steps to reproduce

  1. Log in

  2. Post a work

  3. Log out

  4. Leave a comment on the work

  5. Reply to the comment you left

  6. Log in as admin

  7. Access the first comment

  8. Press "Spam" to mark it as spam

  9. Press "Delete"

What happens

The comment sticks around. You get a red flash error near the comment box with the text, "We couldn't delete that comment."

What should happen

You should be able to delete the comment.

Notes

This bug only seems to happen on production, not staging.

Comments with replies are not actually deleted outright, but rather marked is_deleted. If you try to set the comment's is_deleted value to true on the console, you get the error, "ActiveRecord::RecordInvalid (Validation failed: This comment looks like spam to our system, sorry! Please try again, or create an account to comment.)"

The child comments disappearing when the comment is marked as spam is AO3-5002.

Activity

Show:
Sarken
February 8, 2021, 7:05 PM

This might have been fixed by fussing with the callbacks in – we no longer check for spam when delete/updating guest comments, only when creating.

Assignee

Sarken

Reporter

Sarken

Roadmap

Admin
Comments

Priority

Medium

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Required Access Level

Admin

Milestone

Internal 0.9