PDA

View Full Version : Attachments Table - Going Mad!


TTF
01-05-2013, 11:29 AM
Basically what happened was a large thread with lots of images was soft deleted, then restored. The images have gone as the keep attachments wasn't ticked.

So I've got a backup, merged the attachment table so that all the fields are back and the attachments folder in the file system has also been sorted.

In the database I can see the images point to the correct places, just like before the thread got deleted and I can load the images fine. However in the admin panel under attachment manager, it doesn't seem to show that the table has been updated. The number of rows is like before the tables were merged and the images aren't displaying in the thread - it just said invalid and shows a link of the attachment ID.

I've been trying to sort this for ages now, any help would be ever so much appreciated as I'm going mad here!!! Hoping I just need to reset a counter or something to get vbulletin to see the newly added images in the database.

Thanks.

kh99
01-05-2013, 01:36 PM
I don't understand much about how attachments are stored, but it could be that you also need to restore the filedata table.

Lynne
01-06-2013, 03:04 AM
The image data is actually stored in the filedata table as Kevin said. You need both the attachment table data and the filedata table data.

TTF
01-07-2013, 02:03 PM
Thank you very much for the reply. I have updated this table and now the image does work when you click on the 'attachment xxxx' link. Is there any way to get the previews back so it can open as normal in the lightbox? I have tried rebuilding thumbnails but that hasn't worked.

Thank you.

Lynne
01-07-2013, 05:02 PM
What do you have set in AdminCP > Settings > Options > Message Attachment Options > View Attachments Inline? Is it set to Display Thumbnails? And did you check all usergroup permissions to make sure they have permission to view Thumbnails?

TTF
01-07-2013, 05:21 PM
What do you have set in AdminCP > Settings > Options > Message Attachment Options > View Attachments Inline? Is it set to Display Thumbnails? And did you check all usergroup permissions to make sure they have permission to view Thumbnails?

All of those are set up correctly. It's only an issue with the one thread which got deleted and then I manually restored in the file system and database. I've also rebuilt threads, posts etc and no joy.

Thanks.

Lynne
01-07-2013, 05:25 PM
Did you ever provide a link to the problem thread?

And just to clarify, you restored the attachment and filedata table from a backup but no other tables?

TTF
01-08-2013, 09:01 AM
Did you ever provide a link to the problem thread?

And just to clarify, you restored the attachment and filedata table from a backup but no other tables?

I have sent you a link to the site, hope that's ok. Yes that's correct, I merged an old version with the current version (as the board is quite active and couldn't simply restore) just those database tables.

I'm pleased that I've got the images back but if there's any way to get the thumbnails back as well then that would be really handy.

Thanks again :)

Lynne
01-08-2013, 08:36 PM
Did you try rebuilding the attachment thumbnails? You are using vbseo on your site and so the attachment links are totally different than a default attachment link, so I can't really see what is wrong.

TTF
01-09-2013, 09:42 AM
Did you try rebuilding the attachment thumbnails? You are using vbseo on your site and so the attachment links are totally different than a default attachment link, so I can't really see what is wrong.

Yep, tried rebuilding everything. No problem, well thanks for your help anyway.