Fixed Likes You've Received

It could be related to banned members.
I think it has to do with deleted accounts. Banned users would probably still show fine because they still have a record in the users table, deleted accounts probably make these two queries return different results:

XenForo_Model_Like::countLikesForContentUser($userId)
Code:
SELECT COUNT(*)
            FROM xf_liked_content
            WHERE content_user_id = ?

XenForo_Model_Like::getLikesForContentUser($userId, array $fetchOptions = array())
Code:
SELECT liked_content.*,
                    user.*
                FROM xf_liked_content AS liked_content
                INNER JOIN xf_user AS user ON (user.user_id = liked_content.like_user_id)
                WHERE liked_content.content_user_id = ?
                ORDER BY liked_content.like_date DESC

That's not related to the issue although that should have a different phrase.
 
Likes from deleted members do still count (they're not removed), so I've tweaked it to display those. It also checks the page number now so you can't go too big and get an unexpected message.
 
Likes from deleted members do still count (they're not removed), so I've tweaked it to display those. It also checks the page number now so you can't go too big and get an unexpected message.

Yes page id problems solved now, thank you Mike. Note that's just a SQL Query by Jake and that is awesome. When run it will remove all deleted users with their likes on message or profile posts and recalculate all likes again. After run that query, problem will solve.
 
Back
Top Bottom