Flag -> Delete Spammer - Does not work anymore

This was working well on 2.6.x

Upgraded to 2.7.1 Stable and get this error immediately when trying to use this option (flag → delete spammer) on a post or topic:

There was an error deleting that user. Make sure all posts are deleted before trying to delete the user.

‘delete user max post age’ and ‘delete all posts max’ are both set to the max value of 2000000000.

This option used to delete all of the user’s posts and the account itself.

2 Likes

I might be wrong about the possible correlation, but I recall reading something about a bug fix related to deleting an account when it had PMs recently.

Here it is:

1 Like

Maybe the flag doesn’t delete PMs? Total shot in the dark. Hopefully one of the Discourse team members will have a definitive answer.

1 Like

Thanks for the suggestion :slight_smile: Looked in to this now, it seems probably not related as a couple of users that didn’t have any messages listed under messages → Inbox/Send/Archive still got errors, as well as for a user that had a fair few messages.

Weird is that now it’s working sporadically some of the time, on some users. Prior to the update, it worked every time without issue.

Note: From the review queue, it seems that agree → delete spammer is working fine currently (deletes all posts and the user).

2 Likes

Wonder why it’s sporadic though… :thinking:

I’m not sure if one class of condition(s) fits all of the fail cases. Do they all (or many/most of them) have something in common? Pretty vague, but if I was trying to put my finger on a bug here, that’s the pattern I’d want to know.

Are the errors all the same or are there indicative differences to classify the failures?

1 Like

Thanks @griffin :slight_smile: From what I’m seeing so far, my guess would be that existing post count would be the key variable. Users with less than 10 posts seem to be handled fine, above that is when it starts behaving weirdly, seemingly more so as the post count is higher.

1 Like

That’s a great correlation to make. :slightly_smiling_face: Hopefully it will give the team a starting point to fully resolve the issue.

1 Like

Added the fix in below PR

3 Likes

I’m also seeing this issue. A spammer made several posts on our forum and when I try to flag them and delete the user I get this error:

There was an error deleting that user. Make sure all posts are deleted before trying to delete the user.