This is most likely because it is content that is liked, not users. Therefore, deleting a user will have no effect upon the content they have posted and whether or not people liked it. As such, it is working as designed.
well, I deleted this user because he was a spammer. But he still liked a few posts.
So I have the name of this person showing up at my website in form of "Likes", but in fact this user does not exist at my website anymore.
Does not make sense to show the name of that user within the "Likes".
Imagine the username of this user is some strange name and he likes many posts. Then you figure you mark him as a spammer or quickly delete the user from your system.
You will still have this username appearing..........
so as said, I have deleted a user from my system which actually liked a Forum-post.
Now another person (her name is Claudia) "liked" the same post.
Now the name of the specific user which I deleted is not appearing anymore (no idea why). Which is actually great, but it looks a bit strange as the word "and" is still showing up.
Imagine the username of this user is some strange name and he likes many posts. Then you figure you mark him as a spammer or quickly delete the user from your system.
You will still have this username appearing..........
Ahh, is there still no Fix? I have many deleted Users, but the likes are there. Sometimes the Username is there (but the User is deleted), and sometimes there is only: deleted User .
Try those SQL queries in phpMyAdmin (don't forget to create a backup!)
Code:
DELETE FROM xf_liked_content WHERE like_user_id NOT IN (SELECT user_id FROM xf_user);
UPDATE xf_user AS u SET like_count = (SELECT COUNT(lc.like_id) FROM xf_liked_content AS lc WHERE lc.content_user_id = u.user_id GROUP BY lc.content_user_id);