1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Re-Count messages

Discussion in 'XenForo Questions and Support' started by SeToY, Mar 31, 2016.

  1. SeToY

    SeToY 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?

  2. Chris D

    Chris D XenForo Developer Staff Member

    User post counts are not recalculated.
  3. SeToY

    SeToY 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: Mar 31, 2016
  4. Chris D

    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.
  5. Brogan

    Brogan XenForo Moderator Staff Member

  6. SeToY

    SeToY 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?
  7. James

    James Well-Known Member

    Once the trophy is issued it's issued irrespective of any change. S/he won't get it twice.
  8. SeToY

    SeToY 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
  9. Amaury

    Amaury Well-Known Member

    @Liam W has an add-on that'll do this for you.
  10. SeToY

    SeToY Active Member

  11. Amaury

    Amaury 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.
  12. SeToY

    SeToY 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...
  13. Dysphoria

    Dysphoria Member

    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.
  14. SeToY

    SeToY Active Member

    Check the node options

Share This Page