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

XF 1.2 100 post missed

Discussion in 'XenForo Questions and Support' started by AndreaMarucci, Mar 17, 2014.

  1. AndreaMarucci

    AndreaMarucci Well-Known Member

    One of my members had a little over 5000 messages and I know for sure since he posted a messing stating so and I've seen the counter.

    Now he has written me asking why I've reduced the number of his post but It's not my fault. I've checked and now he has 4910 messages.

    What could have happened considering the nor me nor my user have deleted any message?
     
  2. borbole

    borbole Well-Known Member

    Can you check the admin and moderator logs to see if any member of the stuff deleted/pruned posts/threads?

    What were the latest changes that you did to your forum prior to this happening?
     
  3. AndreaMarucci

    AndreaMarucci Well-Known Member

    Nothing in the moderator log and the last thing I've done is to install an addon that show the birthdays on the calendar from AndyB but I don't think this one is related to the messages missed...
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    Did you by chance change any node so that it's posts don't count towards the totals?
     
  5. AndreaMarucci

    AndreaMarucci Well-Known Member

    Nothing. The only thing I've done is install that addon. That's truly a mistery...
     
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Have you mass moved any threads recently? The only time I've had this happen is when I moved people's threads/posts into a forum where posts do not count - XenForo removes the number of posts from the user's total count.
     
  7. AndreaMarucci

    AndreaMarucci Well-Known Member

    Not possible since I don't have forums where the post doesn't count. I'm getting crazy trying to understand what's happened...
     
  8. borbole

    borbole Well-Known Member

    In that case we have a mystery in out hands as the posts should not vanish like that, out of nowhere.

    P.s. Maybe one of the staff lowered that user 's post count from his profile in the Acp and his/her posts were not really deleted?

    You can also try to run this query at the SQL Box of your db 's phpmyadmin.

    Code:
    SELECT u.username as Username,
           COUNT(*) AS messagecount
           FROM xf_post p
           LEFT JOIN xf_user u ON (p.user_id=u.user_id)
           WHERE u.user_id = x
           ORDER BY messagecount
    Replace x with the id of that user whose post count has been deleted.

    What this query will do is it will return the user 's post count based on all the posts that he/she has done at your forum. And if the number returned does not match the current post count then someone has messed with the post count from their profile. If it matches then his/her posts have been really deleted. Hope it helps.
     
    Last edited: Mar 18, 2014
  9. AndreaMarucci

    AndreaMarucci Well-Known Member

    I'm the only one authorized to access the admin.php so I exclude that someone can mess up with the number of messages...

    Let me try with your query and I'll let you know...
     
  10. AndreaMarucci

    AndreaMarucci Well-Known Member

    Ok tried this and the result is 5.081 but on the forum the message count is 4.917 so what's happened?
     
  11. borbole

    borbole Well-Known Member

    That means that that user 's posts have not been deleted. You can set his/her post count according to the number returned in the query to bring his/her post count en par with this/her posts made in the forum.

    Regarding as to why that happened the only thing that I can think of is that somehow his/her post count got messed up in the profile field. Or someone did that from the phpmyadmin as well.
     
  12. AndreaMarucci

    AndreaMarucci Well-Known Member

    No one but me can access the admin. I've checked my messages count. 14.393 is displayed in the forum and 14.595 using the query so I can assume that also other counts are wrong.

    What can I do to fix this? Which number is correct? The one using phpmyadmin or the one displayed in the forum? but the questionis, where do the system takes the number displayed if not from the message count ???
     
  13. Martok

    Martok Well-Known Member

    Wouldn't this query include soft deleted posts? If so then the result clearly wouldn't match the the user post count and it would then be incorrect to set the user's post count to this value.
     
  14. Mike

    Mike XenForo Developer Staff Member

    Well that query doesn't account for posts that were deleted, posts that are in deleted threads, posts in forums where they don't count (I know that doesn't apply to you), or (off chance) posts in threads that are "orphaned" (deleted forum).
     
  15. AndreaMarucci

    AndreaMarucci Well-Known Member

    Thanks Mike. I wander what's happened so since I've see with my own eyes that the forum count, that now show 4.917, some days ago showed more than 5.000 posts...
     
  16. borbole

    borbole Well-Known Member

    Yes, it does include the soft deleted posts but the OP said that he did not delete or touched in any other way the posts of that user. Hence why I did not exclude them from the query.
     

Share This Page