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

Member with 5,487 empty albums!

Discussion in 'Media Gallery Support' started by imthebest, Apr 16, 2015.

  1. imthebest

    imthebest Formerly Super120

    While debugging some things on my XFMG installation today I found that I have a member with 5,487 empty albums, all with the same title "I'M WATCHING YOU @.@"

    All albums seem to have a creation date of Aug 2009. These albums were imported from vBulletin 3.x however I can't confirm right now if the source data had in fact those 5,487 identical empty albums for the member or if it was a migration error (I didn't got any error message during the migration, everything went perfectly fine using the XF standard importer and then the XMG standard importer). I guess I'll need to restore my old vBulletin backup in order to further investigate this problem.

    The member is banned so he isn't being listed at the Notable Members list under the Most Albums tab.

    Could you please provide me a query to list the top 10 members with the highest albums count regardless if they are banned or not? This will help me to find any other similar occurrence to further investigate.

    Thanks,
    Super120
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    When you imported did you retain content IDs or not?
     
  3. imthebest

    imthebest Formerly Super120

    Yes, I retained content IDs.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Definitely not a migration error then.

    Query is
    Code:
    SELECT * FROM xf_user ORDER BY xengallery_album_count DESC LIMIT 10
     
  5. imthebest

    imthebest Formerly Super120

    Thanks for the query, it seems that he's the only guy with that problem. Maybe the problem was present in vBulletin.

    How I can fix this? I'd like to remove all the albums from that member. Could this be safely done through a SQL query or it needs to be done via the UI (which will be a pain considering the huge amount of albums)?
     
  6. imthebest

    imthebest Formerly Super120

    Chris when you get some time please give me a hand with this one. Thanks!
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    Code:
    DELETE FROM xengallery_album WHERE album_user_id = 9999 AND album_media_count = 0
    Change 9999 to the user ID of the user.

    Back up first!
     
  8. imthebest

    imthebest Formerly Super120

    Do I need to run any rebuilder after this or just wait for the next run of the "Update XenForo Media Gallery Statistics" cronjob?
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    Should be fine now.

    That guy's album count is a lot higher now than it should be.

    That's fixed by:

    Code:
    UPDATE xf_user
    SET xengallery_album_count = 0
    WHERE user_id = 9999
    Change 9999 to the user ID of the user.

    Back up first!
     
    imthebest likes this.

Share This Page