XF 1.5 Re-Count messages


Active member

I've just changed the option "Count messages posted in this forum toward user total" on two of my forums. Now I've got a user with only a single post inside said forum.

After I've disabled this option and re-run all possible cache re-builds and the "Rebuild Board Totals Counter" cron, the messages counter for this user still shows 1.

As far as I'm concerned, it should show 0 now?

How can I do this?



Active member
That's a bummer. Any plans on implementing such a crucial feature? Totally destroys the purpose of being able to change it after messages have already been posted :( Is there a way to do it manually?
Last edited:

Chris D

XenForo developer
Staff member
I believe it may have been suggested before. I believe there might be an add-on for it, but I can't find it at the moment.


Active member
Thank you. I've now seen that this user already has got the trophy for writing his first message.

What will happen if the system recognizes that the user writes "another first message" when this query resets his count to 0?


Active member
Thank you. Tried to run the query:

Static analysis:

2 errors were found during analysis.

An alias was expected. (near " " at position 17)
Unrecognized keyword. (near "user" at position 18)
SQL query: Documentation

UPDATE xf_user AS user SET message_count = ( SELECT COUNT(*) FROM xf_post AS post LEFT JOIN xf_thread AS thread ON (thread.thread_id = post.thread_id) WHERE post.user_id = user.user_id AND thread.node_id NOT IN (9,41,45,22,46) AND post.message_state = 'visible' AND thread.discussion_state = 'visible' GROUP BY post.user_id )

MySQL said: Documentation

#1048 - Column 'message_count' cannot be null


Well-known member
It's not listed there, but I can vouch it works. Most add-ons will work even if they were made before a second-point release.


Active member
Awesome, thanks for sharing your experience! I've just installed it and it has worked fine so far. :)

Really should be included per default...
Sorry, but where can I set or unset the setting: "Count messages posted in this forum toward user total"
I can't find it and the search in the admin panel does not neither.