View Full Version : Attachment Issues After Upgrade
puertoblack2003
07-08-2015, 02:05 AM
I upgraded last Friday to the latest version.I have never had this issue before.Until one of my forum members pm m,e that they were unable to download a file.That i had already uploaded.When i checked the thread, the file is missing.I though it'll be a database issue. So i checked the file number and it's in the database.I have about 27 gig of attachments.When i tried and rebuild attachment, It only rebuild one photo that i uploaded on Sunday.
So, how can i resolve this issue. Database structure is fine with all attachment listed. File structure points to where i have selected it. Not sure where else to go to fix it.
T.I.A
RichieBoy67
07-08-2015, 02:54 AM
Would you mind posting the link?
27gigs is a ton of attachments to be serving from your database. The file system is much better, faster, etc for attachment storage i think.
What version of php and mysql do you have?
puertoblack2003
07-08-2015, 03:01 AM
Would you mind posting the link?
27gigs is a ton of attachments to be serving from your database. The file system is much better, faster, etc for attachment storage i think.
What version of php and mysql do you have?
i should have mentioned file system, which I'm on.I checked the db thinking it was wiped.
php-5.5.26
mysql - 5.6.25
site (http:///)
puertoblack2003
07-15-2015, 01:50 AM
not sure if this is a global issue with other users but in this post https://vborg.vbsupport.ru/showthread.php?p=2550145#post2550145 he apparently has the same issue as me.
RichieBoy67
07-15-2015, 02:35 AM
I am working on this for the request you posted and it is different from what you posted here. His site is missing attachments mostly before a certain time, not all. He has no attachment data in posts or anything else and I do not believe his issue occurred because of an upgrade.
As for your issue I have no idea how a simple upgrade would remove your attachment data and I have already done this 4.2.3 update on about 13 or 14 sites without any attachment issues. With that said I do not believe it to be global. :)
Are your attachments showing in the filedata table or post table? If not they are ever going to show in your posts even if they do exist in the attachments table.
squidsk
07-15-2015, 01:52 PM
The problem is related to a bug in vb that was fixed in 4.2.3 in one of the daily cleanup scripts. The end result of the bug was that attachments that were not attached correctly were not being cleaned up as intended. Once you install 4.2.3 the daily cleanup was working correctly and those incorrectly attached attachments got deleted.
puertoblack2003
07-15-2015, 02:33 PM
I am working on this for the request you posted and it is different from what you posted here. His site is missing attachments mostly before a certain time, not all. He has no attachment data in posts or anything else and I do not believe his issue occurred because of an upgrade.
As for your issue I have no idea how a simple upgrade would remove your attachment data and I have already done this 4.2.3 update on about 13 or 14 sites without any attachment issues. With that said I do not believe it to be global. :)
Are your attachments showing in the filedata table or post table? If not they are ever going to show in your posts even if they do exist in the attachments table.
thanks for the direction to resolve my issue. I compared filedata tables with my backup from a week ago. There's a big difference, so i restored my filedata.sql and everything is back. still have some cleaning up to do.But it's back. As i said all this happened with upgrade to 4.2.3. squidsk mentioned the issue and i will monitor it.
thanks for your help
The problem is related to a bug in vb that was fixed in 4.2.3 in one of the daily cleanup scripts. The end result of the bug was that attachments that were not attached correctly were not being cleaned up as intended. Once you install 4.2.3 the daily cleanup was working correctly and those incorrectly attached attachments got deleted.
thanks for the heads up.I have to figure out as to what incorrectly attach is, so i know if my members is doing something wrong. I have attachments back in 2004 that was removed, after the upgrade.
RichieBoy67
07-15-2015, 03:12 PM
The problem is related to a bug in vb that was fixed in 4.2.3 in one of the daily cleanup scripts. The end result of the bug was that attachments that were not attached correctly were not being cleaned up as intended. Once you install 4.2.3 the daily cleanup was working correctly and those incorrectly attached attachments got deleted.
Thanks for the information but what exactly do you mean by incorrectly attached? Are you sure this is a bug and is this listed?
TexArkana
08-11-2015, 03:41 AM
Thanks for the information but what exactly do you mean by incorrectly attached? Are you sure this is a bug and is this listed?
Did you ever find out what was meant by incorrectly attached? We seem to be experiencing a similar problem.
Thanks.
RichieBoy67
08-11-2015, 03:09 PM
Did you ever find out what was meant by incorrectly attached? We seem to be experiencing a similar problem.
Thanks.
In this case this was not the issue as his attachments were lost before he did the upgrade. I suspect someone pruned them.
squidsk
08-11-2015, 05:34 PM
Sorry forgot about this thread. Here's the link to the article that describes incorrectly attached attachments.
http://experienced-people.net/forums/showthread.php/9608-vBulletin-4-xx-Stop-Attachments-Getting-Deleted-the-Invalid-Attachment-Problem
This becomes a problem due to the bug in versions pre 4.2.3 as described here (http://tracker.vbulletin.com/browse/VBIV-16070). You'll need to be logged into vb.com to see the issue in the tracker. Basically invalid attachments were not deleted, so looked valid, but once you upgraded to 4.2.3 all those invalid attachments that had not been deleted all of a sudden get deleted in one fell swoop and it looks like you lost a tonne of attachments.
puertoblack2003
08-11-2015, 05:50 PM
Sorry forgot about this thread. Here's the link to the article that describes incorrectly attached attachments.
http://experienced-people.net/forums/showthread.php/9608-vBulletin-4-xx-Stop-Attachments-Getting-Deleted-the-Invalid-Attachment-Problem
This becomes a problem due to the bug in versions pre 4.2.3 as described here (http://tracker.vbulletin.com/browse/VBIV-16070). You'll need to be logged into vb.com to see the issue in the tracker. Basically invalid attachments were not deleted, so looked valid, but once you upgraded to 4.2.3 all those invalid attachments that had not been deleted all of a sudden get deleted in one fell swoop and it looks like you lost a tonne of attachments.
thanks for additional info. I will monitor this for future upgrade, thankfully i always do backups.
ArjanL
12-09-2015, 05:21 PM
A bump, but maybe a clue for people converting.
I lost over 9000 attachments due to this, only the last 35 or so attachments were present. And actually I think it is a bug in the upgrade script. I upgraded from 3.8.9 to 4.2.3.
Some time later all my attachments were gone.
So, I did a new upgrade andpayed attention to the two known tables.
What I noticed that for all attachments but the last couple, the fields for height width and refcount had no value or "0" actually.
So, it seems to me that not all records are updated correctly in the upgrade process.
EDIT: Reason for this opinion: For the records missing the Refcount data, also the height and width fields contained no data, wehre the ones that did have a Refcount, also had a value in this field.
For who is planning an upgrade:
For this problem you can just go ahead. But disable the "Hourly Cleanup 2" first thing after the upgrade, and do not run update counters. Set the refcount to 1 as described here: https://vborg.vbsupport.ru/showthread.php?t=320246
Then you can enable the disabled task again. And do all other things you have to do after the upgrade.
squidsk
12-10-2015, 03:52 PM
A bump, but maybe a clue for people converting.
I lost over 9000 attachments due to this, only the last 35 or so attachments were present. And actually I think it is a bug in the upgrade script. I upgraded from 3.8.9 to 4.2.3.
Some time later all my attachments were gone.
So, I did a new upgrade andpayed attention to the two known tables.
What I noticed that for all attachments but the last couple, the fields for height width and refcount had no value or "0" actually.
So, it seems to me that not all records are updated correctly in the upgrade process.
EDIT: Reason for this opinion: For the records missing the Refcount data, also the height and width fields contained no data, wehre the ones that did have a Refcount, also had a value in this field.
My only comment on this is that it isn't anything in the upgrade script for 4.2.3 since that script does not touch the filedata table. The data is already corrupt in the table before the upgrade, it's just that the upgrade actually reveals the problem because filedata is actually being deleted.
For who is planning an upgrade:
For this problem you can just go ahead. But disable the "Hourly Cleanup 2" first thing after the upgrade, and do not run update counters. Set the refcount to 1 as described here: https://vborg.vbsupport.ru/showthread.php?t=320246
Then you can enable the disabled task again. And do all other things you have to do after the upgrade.
Actually at this point I'd just hold out for a bit until 4.2.4 is released as it fixes the issue with corrupt refcounts in the filedata table.
ArjanL
12-10-2015, 04:52 PM
My only comment on this is that it isn't anything in the upgrade script for 4.2.3 since that script does not touch the filedata table. The data is already corrupt in the table before the upgrade, it's just that the upgrade actually reveals the problem because filedata is actually being deleted.
In that case I am curious what does make the tabel, because it isn't in my 3.8.8 database....
Anyway, whatever creates or updates that database, does not set all refcounts and width and height fields, but in my case only the last 34. And I am able to reprodues that over and over again by upgrading the database from 3.8.8 to 4.2.3
This because vB support just told me that doing the upgrade again would fix my problem, not telling that the Refcount and cleanup job were the actual problem.
Actually at this point I'd just hold out for a bit until 4.2.4 is released as it fixes the issue with corrupt refcounts in the filedata table.
Lets hope it fixes the missing height and width fields as well, because, then though I have my attachments back, they do not show up in the messages itself, due to the missing height and width data. vB support confirmed that the missing height and width data is the cause of that problem. Unfortunately they were not able to supply a fix for it. :mad:
Some comment and info with regards to this issue. Exactly the same happened to me.
I did the 3.8.9 upgrade to 4.2.3, everything looked good. The next month I realised all the attachments were gone. The physical attachments were still on the drive, but the filedata table was empty. This to me confirms the problem is in one of the cleanup scripts and not in the actual upgrade script.
Luckily I did a database dump directly after the 4.2.3 upgrade before I started fiddling with any addons or mods. I looked at this db and the filedata table was there with all the attachment entries.
We extracted that one table, updated the refcount field which was zero for all entries to 1, then we imported this one table back into the live system and this brough back all the attachments.
So if there is anybody out there suffering the same problem, you could try a similar process. If you do not have a backup of after the upgrade you will have to run another upgrade on your v3 database. Once the upgrade is completed look at the new filedata table, if the attachment entries are there you need to first update all line items and change refcount from 0 to 1.
Then you need to go back to your live forum and dump all those entries to a sql file just incase.
From the fresh upgrade dump only the filedata table. Now you have to merge this into your existing live system, make sure not to go and delete any new entries that is there.
Hope this helps somebody out there, I lost far too many hours with this after the upgrade.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.