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

As Designed deleted user / Likes still appear

Discussion in 'Resolved Bug Reports' started by erich37, Apr 4, 2011.

  1. erich37

    erich37 Well-Known Member

    I just deleted a certain user, but the "Likes" from this user are still showing up in the system.

    Did rebuild caches but the "Likes" of this user do not disappear.
  2. Kier

    Kier XenForo Developer Staff Member

    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.
  3. Mike

    Mike XenForo Developer Staff Member

    Plus with this being cached, I don't think there's a real way to stop this.
  4. erich37

    erich37 Well-Known Member

    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..........
  5. erich37

    erich37 Well-Known Member

    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.

    Please see the screenshot below:

  6. dutchbb

    dutchbb Well-Known Member

    Yes, this is especially a problem if the username is very disturbing. Not likely to happen often maybe, but you would like to be able to delete it.
  7. Krochinzky

    Krochinzky Member

    Shouldn't be costly to have a mass like deletion on user removal from the json likeUsers column
  8. kkm323

    kkm323 Well-Known Member

    I'm facing the same problem :mad:
  9. erich37

    erich37 Well-Known Member

    I remember this was improved.
    Which XF-version are you running ?
  10. kkm323

    kkm323 Well-Known Member

    1.1 RC1,
    I really want to delete those user? i am just afraid the likes would remain there?
  11. mauzao9

    mauzao9 Well-Known Member

    I Hate this, we can't even by the Spam Cleaner delete the user likes!
    Aren't the user likes, user content too? Soo why isn't that possible? o_O
  12. BamBam

    BamBam Active Member


    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 .
  13. rellek

    rellek Well-Known Member

    Try those SQL queries in phpMyAdmin (don't forget to create a backup!)
    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);
    And then this script:
    Alluidh likes this.

Share This Page