Page 1 of 1

Missing attachments

Posted: Tue Jul 04, 2017 4:45 pm
by dave
When I moved the forum to an Amazon EC2 instance, some of the images/file attachments seem to have broken. I will do my best to fix them. Please use this thread to list any instances of broken links or missing image/file attachments, so I can deal with them.

Thanks,

Dave

Re: Missing attachments

Posted: Thu Jul 06, 2017 4:06 pm
by Andis
Hi Dave,

I have been using a few different threads to check out issues regarding viewing attachments. You generally end up with 5 different possible results (that i have found).

I still don't have an attachment tab, when logged in. Maybe has to with the '<b>Information</b>: This board is currently disabled' warning that shows up at the top of a thread when you log in...

I appears that you can
1)
Not logged in, you can see the image if if it is not hosted locally (i.e http://www.crisis.au/images/C4P.jpg)
2)
Or, still not logged in, get an image that says "You do not have the required permissions to view the files attached to this post". This is the case if the image is hosted on the OSIweb server. When you "Inspect the element using a browser you can see the div has a ' class="rules" ', so if you have "Rules Permissions" on the admin panel, i would look there.
3) or a variation on 1) above, if the image is stored on www.photobucket.com you get an image that says "please upgrade your account to enable 3rd party hosting". This is not unique to the OSI forum, I also saw the same exact image/behavior on another forum. So this type of attachment is technically not broken.

4) If you log in, you can then view the OSI stored images. The div has a ' class="inline-attachment"
5) If you log in, you get an image that is simply the text of the filename. If you right click on this image, you can "View file info" and see that it does indeed point to the OSI server, but the picture is not there. The class of the div has correctly changed to class="inline-attachment" but is an actual broken link (e.g. missing file?).

You can check out items 1), 2) and, 4) at: http://www.osiweb.org/osiforum/viewtopic.php?f=3&t=343

For items 1), 3), and 5) see: http://www.osiweb.org/osiforum/viewtopi ... v+10a#p622

Hope this helps, Andis

Re: Missing attachments

Posted: Fri Jul 07, 2017 12:25 am
by dave
It seems a lot of the missing attachments are from older posts. I found an old snapshot of the website, including the forum, from 2012, and it had 64 files, all of which are still present in the current files directory, but none of which appear to be visible. I suspect there was some kind of database corruption during one of the forced upgrades I had to do a couple of years back, again due to some midphase software updates.

This is fixable, but tedious. I will have to go through all the posts by date, look at the attachment files with similar date stamps, review them to see if they match, and re-upload them to register them properly with the database, while deleting the old attachment links. There are 334 attachments, and I am hopeful that they represent the complete set.

I hope to do this in small chunks over the next few weeks/months, as I have time.

If anyone wants to volunteer to help with this, I can grant privileges to edit posts.

Also, if anyone wants to go through their old posts to try to re-upload attachments, that would be a big help as well.

You can see the raw files (with database hash names) at http://www.osiweb.org/osiforum/files/

According to the unix 'file' utility, most are JPEG, and a good number are ZIP files. I will see if I can generate some descriptions for Apache's autoindex mod.

Re: Missing attachments

Posted: Mon Jul 31, 2017 8:31 am
by dave
I fixed some bad permissions in the "files" directory, and I am hoping this will bring back many of the previously inaccessible photos and files.

Some missing photos seem to be due to broken links to external file sharing services such as photobucket.

Hopefully the original posters can be convinced to edit their posts and upload the photos directly.

It would be helpful to post any broken file links or otherwise inaccessible images here.

Thanks,

Dave

Re: Missing attachments

Posted: Wed Aug 02, 2017 1:55 am
by Andis
Dave,

I went through the posts that I listed in my July 6 post above. It appears that the files hosted on osiweb.org are now accessible, except those hosted on Photobucket.com. I am not sure if all Photobucket.com photos are inaccessible, or just some. I will keep looking into that issue.

There is still a permission issue on Guests browsing the photos. Using this post as a reference : http://www.osiweb.org/osiforum/viewtopic.php?f=3&t=343 , (far from a complete study, but I also did look at my pre-restore post and a few others) , it appears that photos posted after the restore are accessible to guest browsing, while photos posted before the restore, a user must be logged in to view those.

Jeff, you have a thread with the photobucket.com issue: http://www.osiweb.org/osiforum/viewtopi ... v+10a#p622

Andis

Re: Missing attachments

Posted: Thu Aug 03, 2017 5:42 pm
by dave
Andis wrote: Wed Aug 02, 2017 1:55 am There is still a permission issue on Guests browsing the photos. Using this post as a reference : http://www.osiweb.org/osiforum/viewtopic.php?f=3&t=343 , (far from a complete study, but I also did look at my pre-restore post and a few others) , it appears that photos posted after the restore are accessible to guest browsing, while photos posted before the restore, a user must be logged in to view those.
Very interesting--I was aware of the guest browsing issue, but did not realize that new posts were viewable. In the worst case, the brute force solution would be to go back and re-attach all those photos and files. However, maybe with this information, there may be a way to do some careful database surgery to fix it. For certain, I won't do anything without backup up first. I welcome suggestions from anyone familiar with phpBB.

Dave