Admin Panel "Number of Posts" Inaccurate?

AI-generated summary

A discussion was started by Er00 regarding an inaccuracy in the “Number of Posts” count in the Admin Panel. Upon investigation, it was found that the discrepancy was caused by the inclusion of system actions (post_type: 3) in the count. Er00 suggested that only regular posts (post_type: 1) should be counted. codinghorror agreed and brought it to neil’s attention. neil acknowledged the issue, added it to their list, and eventually fixed it by excluding system actions and whispers from the post count.

I noticed that one day had significantly (like, 10x) more posts recorded in the last month on the admin panel and dug into it as we need to report such stats and would be asked what had caused it.

This is the output from the forum DB:

post_type | count
-----------±------
1 | 94
2 | 12
3 | 935

It looks like type 3 is causing the issue here but I’m not sure what that is.

I’ve checked and it really doesn’t look like there were a gazillion posts on that day, but if I can figure out what post_type 3 is then we can maybe work out what’s causing the issue. For now, I’ve just used 106 as the number of posts (ie excluding type 3 entirely) but ideally I’d have more confidence on that decision! :slight_smile:


Edited to add
Just found this:
"post_type":{"regular":1,"moderator_action":2,"system_action":3}

I think system actions probably ought not to be counted in posts? Unsure about mod actions either really… Maybe only regular posts should be counted for the post count?

4개의 좋아요

Yes this is a good point @neil can we address this?

Yes, good catch. Added to my list.

1개의 좋아요

I made a fix for this. I also excluded whispers since it doesn’t help indicate how active your community is.

4개의 좋아요