As designed Deleted user problem (Likes You've Received)

Eagle

Well-known member
This still runs after a user is deleted in Likes You've Received Page. I'm not sure it's just a bug or as designed however when go to see liked my message, username showing but in Likes You've Received page no. It is showing "Unknown Member". If user is deleted, then his/her have to remove in Lines You've Received page too.

deleteduserlikes.webp
 
I think its normal. Because when you delete user XF didn't remove any data from user ;-)
Its happen with content_type: post, profile_post,... :)
 
I think its normal. Because when you delete user XF didn't remove any data from user ;-)
Its happen with content_type: post, profile_post,... :)

Yes that is correct however deleted users removed from likes list in messages. It should be remove from Likes You've Received page. Because this is like. It's not post or profile post. If user is deleted then his/her all likes should be remove from everywhere. But it's just only for likes. It's not post or profile post/comments etc.
 
Last edited:
I have fixed this now.

Step 1:
First backup and run these SQL Query;

Code:
DELETE
FROM xf_liked_content
WHERE like_user_id = 0;

Code:
DELETE
FROM xf_liked_content
WHERE content_user_id = 0;

Code:
UPDATE xf_user AS u
SET like_count = (
    SELECT COUNT(*)
    FROM xf_liked_content AS lc
    WHERE lc.content_user_id = u.user_id
    GROUP BY lc.content_user_id
);

***

PS thanks to @Jake Bunce

***

Now all "unknown member" likes removed from Likes You've Received Page, posts, content, etc.

Step 2:
Now use this file after running SQL Queries:
https://xenforo.com/community/threa...t-profile-post-like-caches.42384/#post-457352

Done.

All deleted user likes has been removed from the Database.

Note that I hate when delete a user. I would recommend that you never delete user.
 
Top Bottom