• 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!

imthebest

Well-known member
#1
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
 

Chris D

XenForo developer
Staff member
#4
Definitely not a migration error then.

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

imthebest

Well-known member
#5
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)?
 

imthebest

Well-known member
#6
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)?
Chris when you get some time please give me a hand with this one. Thanks!
 

Chris D

XenForo developer
Staff member
#7
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!
 

imthebest

Well-known member
#8
Do I need to run any rebuilder after this or just wait for the next run of the "Update XenForo Media Gallery Statistics" cronjob?
 

Chris D

XenForo developer
Staff member
#9
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!