Why post count differs on admin page and about.json?

Hi, I found that post count for the latest 30 days in about.json and admin page are different 6242 vs 5562:


Why? Topic count is equal. I tried to do some calculations but did not find any logic.

Discourse 1.9.4

The post count is calculated differently on the About page than it is on the Admin Dashboard. On the About page the post count is calculated with Post.count. The query that is used for the 7 day and 30 day periods is similar to this. It will return all posts, including PMs. On the Admin Dashboard the post count is calculated with this:

Post.public_posts.where(post_type: Post.types[:regular])

This will exclude private messages from the post count. It will also exclude moderator action, small action, and whisper posts from the post count.


@Simon_Cossar, thank you for the explanation!

We used to use about.json for statistics on our website. Now we can explain the difference :slight_smile:. Topics number is approx.equal, and posts number includes small actions (assignments and un-assigments, usually +2 per topic, etc).

Solved for me,