XF 1.4 Likes and message count is wrong

Hi all.

I've noticed that the message and like counts of several users is wrong. I think that it could have been caused by a thread accidentally soft-deleted and the undeleted,

Now if I check "Likes I've received" and I count them all I should have 64 likes, my profile info reports only 52 likes.

Rebuild user caches can be the solution or is there something else to do? Is this a safe operation?



XenForo developer
Staff member
There aren't any tools to rebuild like or message counts. You would need to manually edit them via the user profile if you feel they're incorrect.
Hi, thanks for your replies, will keep the numbers wrong as at the end it's not that much important and I've a quite big database so I think I could face some errors while perorming the script.

I've noticed also that number of total messages in the forum where the discussion was deleted and then undeleted is wrong. Is this a normal behaviour? Is there something safe to fix at least this? Thanks!


Well-known member
I'm having the exact same issue but on a much larger scale I think. A thread with 43,000 posts in it was soft-deleted, and then restored. An example user's post/like count went from 5,000/7,000 down to 2,900/5600 (most of said user's posts/likes were in and from that one thread).

@Jake I'll try those queries - are they safe to do on a live big board? I'm ok with it taking a long time.