XF 2.1 Lost some images randomly after upgrade from 1.5

Dakis

Well-known member
After upgrading one of my forums from 1.5 to 2.1 some images that have been uploaded as attachments do not show at all, they give a 404 error file not found.

How can I troubleshoot this and find out what the problem even is? I tried a rebuild of the attachment thumbnails but nothing's changed. It's a bit of a worry because this has not happened to all images, and it seems pretty random.

Here's an example from photos that show up in one post but others do not show up in another post of the same thread:





Any ideas?
 
You seem to have some sort of add-on or special configuration involved because your attachment URLs appear to be slightly different to what I would expect:
Code:
https://www.avsite.gr/forum/data/attachment-files/2019/07/247944_cbb32c77548a111a09b4ed1fe5df85dc.jpg
Worth noting that between XF 1.5 and XF 2.1 we make no changes to the location that attachments are stored or their URL structure or anything. i.e. if an attachment works in XF 1.5 then it automatically works in XF 2.1 because we store the file with the same filename, in the same place, with the same URL, in the same database tables with the same IDs etc.

Generally full attachment URLs look like:
Code:
https://www.avsite.gr/forum/attachments/<attachment_id>
And thumbnail URLs look like:
Code:
https://www.avsite.gr/forum/data/attachments/<data_id>-<file_hash>.jpg
So for your URLs to contain data/attachment-files there is or was something custom going on here that we're unaware of.
 
It's the BD attachment store , but I haven't changed its configuration from 1.5 to 2.

I will try to find the answer in that add-on , although there doesn't seem to be a topic here for the 2 version of it.

Thanks Chris.
 
Just wanted to say a massive thank you to @AndyB for helping me sort out this massive issue. He helped me use one of his add-ons to get a list of all the attachments missing and from that I was able to create a batch file to copy them across from an older backup.

Many thanks Andy, your assistance is much appreciated.
 
Last edited:
Back
Top Bottom