Discourse is complaining about existing posts when attempting to delete a user whose only apparent writing interaction with the system was sending a private message asking for the account to be deleted. I’ve deleted that topic, and even then cannot delete the account.
The incorrect negative numbers are in the user_stats table, and fixing them by hand still doesn’t allow the account to be deleted. So two independent bugs, apparently.
Do You see Delete Posts Button in the Admin > Users > (Target User) ? Scroll Down to Topics Created and so fields and you’d see a button to delete all topics by a user (including private messages).
Click that and it should probably let you delete the user
or You’d see something like cannot delete posts max post date limit is xx
so you can modify your setting to be … say 360 days and then the button will be automatically enabled.
it was Introduced in Beta 10 but living on the edge is the best possible choice for you, There are a lot of issues in beta 10 addressed in tests-passed.
I’ve updated to 1.8.10.beta10 +307, and the button doesn’t show up, and I still cannot delete this user.
Going to the activity page shows a bar at the top looking like this:
Going into the deleted posts shows that one private topic that was deleted still, and trying to click any of the Delete buttons results in the same error still: There was an error deleting that user. Make sure all posts are deleted before trying to delete the user.
Found the issue: I was using an IAM policy on Amazon’s S3 that prevented deletes as a safety net, because I assumed image uploads were one-way only. Turns out deleting the user attempts to delete content from S3 as well, supposedly to remove the avatar image? Haven’t confirmed that yet, but logs will show in a short while. The S3 delete error eventually cascaded into the standard and in this case misleading “delete all posts” message.
I’ve now opened up the IAM policy for object deletes on the bucket, but preserved it with object versioning, which implies we still get the safety benefits while allowing deletes to happen.