User's posts go to approval queue due to incorrect user post count

On one of my self-hosted installs, I have a user whose posts go to the approval queue, and I cannot figure out why. Here’s what I know:

  • The staff action log does not mention the post being sent to the queue, just the approvals that follow.
  • This posts appear to be innocent, no links, for example just a quote and text.
  • The user isn’t silenced, so I don’t think this is caused by a min first post typing time violation.
  • We have not modified any setting that matches approve, e.g. approve post count and approve unless trust level are both 0.
  • The user is not staged.
  • It appears that three of four topics / posts the user has created have been affected.

Is there any reason left for why the posts go to approval?

I think it has to do with first_post_typing_time as that sometimes mutes and sometimes does not.

The user says that she’s definitely typing more than three seconds, and not pasting in text typed somewhere else.
Either way, I set min first post typing time to 0, maybe that’ll help.

Rogue browser setup would be my guess? Remember the detailed first post checks mostly only apply to trust level 0 users.

Have this user try in a different web browser and on their phone versus computer.

Than that shouldn’t be it as that user is TL1 :thinking:

I’m not sure. Do you have any Watched Words that force posts into approval?

No, there are no watched words at all.

The user has just noticed that the post counter in her profile is off – it’s currently at zero, but has been negative before.

I think this explains what has been happening – even if approve post count is 0, if a users post count is off, he can run into this check:


Did this person have a lot of pms that got deleted or posts that got deleted somehow? Your theory makes sense.

We should add protection here @neil in some form.

1 Like

There was some post deletion.

The story is that that user sent me a PM, asking a question of which she was not sure whether she was allowed to ask that in public. I answered, and then asked her whether she was OK with making that public. She agreed, I deleted the discussion about turning the message public, and then used the feature to turn the message into a normal, public topic.

Apart from this, nothing fancy happened to the account, I think.

Also, there was another conversation before that that was converted from a public topic to a message before I replied.

Apart from this, nothing fancy happened to the account, I think. (Again.)


I confirmed there was a problem with post counting in personal messages and made a fix.

Deleting a post in personal message would subtract from the user’s post count stat, but they aren’t counted when they’re created. So post counts can become negative. Changing topics from personal to/from public was adjusting counts correctly.


How can we fix this for existing accounts? Is there a way to trigger a re-count?

We don’t have a way to do a recount, but I’m building a task to do it.


That sounds perfect :+1:

(I’d love it if it also recalculated other counters, specifically the number of topics per category, as we also have a – likely unrelated – weirdness there.)

I added rake users:recalculate_post_counts.

We already do that once per day. Open a new topic about it with details.


Since this has now landed in beta, I can confirm rake users:recalculate_post_counts did its job and the problem is solved :+1:

Thanks! :heart: