Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 01-05-2013, 11:29 AM
TTF TTF is offline
 
Join Date: Aug 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Attachments Table - Going Mad!

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.
Reply With Quote
  #2  
Old 01-05-2013, 01:36 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't understand much about how attachments are stored, but it could be that you also need to restore the filedata table.
Reply With Quote
  #3  
Old 01-06-2013, 03:04 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-07-2013, 02:03 PM
TTF TTF is offline
 
Join Date: Aug 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 01-07-2013, 05:02 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #6  
Old 01-07-2013, 05:21 PM
TTF TTF is offline
 
Join Date: Aug 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #7  
Old 01-07-2013, 05:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 01-08-2013, 09:01 AM
TTF TTF is offline
 
Join Date: Aug 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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
Reply With Quote
  #9  
Old 01-08-2013, 08:36 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 01-09-2013, 09:42 AM
TTF TTF is offline
 
Join Date: Aug 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05425 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete