Advertisement:

Author Topic: Image attachments aren't preview/loading correctly in some posts after RC3  (Read 16301 times)

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
Have you guys seen anything like this?
http://www.westknoxrc.com/index.php?topic=625.0

The image links aren't showing the preview. Clicking on them sometimes shows the image and sometimes it doesn't.  I'm not sure what's going on.  Is this a permissions issue?

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Did they work properly before you installed the HighSlide mod?

Try running repair_settings.php.: What is repair_settings.php?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
I had HighSlide installed before the upgrade from RC2 to RC3 without problems.  After the RC3 upgrade, I noticed the problem.  I thought that maybe reinstalling HighSlide would resolve and had to emulate RC2 to install it.  It didn't help so, I have uninstalled HighSlide.

I ran Repair_Settings.PHP but everything looked ok.  Were you thinking the attachment directory was wrong?

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Yah, I was hoping it was something simple like the folder path being wrong. I have seen it happen.

Are you sure it was working before the upgrade?
In the Attachment Settings there are a number of file utilities. Have you run them to check for errors?
Does it do the same for newly added images?
Any attachment related errors in the error log?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
 :-[
I think I pooched my forum.  I upgraded my FileZilla client some time back and have been making backups with it.  Apparently, by default, it treats files without an extension as ASCII.  Attachements in the attachment folder do not have extensions and I believe now that they were corrupted by ASCII conversion.

Does that sound right to you guys?

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
Is there a way to fix files that have been transferred as ASCII but should have been transferered as BIN?

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Yep, that's the problem

Do you still have access to uncorrupted files anywhere?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
I should be able to view any file in the attachments director just by renaming it to the correct extension, correct?

For example, if I rename
667_ex-raider_jpg_thumb91d8a92f4aea1f29ba94e8489f29ddf7
to
667_ex-raider_jpg_thumb91d8a92f4aea1f29ba94e8489f29ddf7.jpg
I should be able to view it with an image viewer, right?

Please tell me there's a fix.. an ASCII to BIN File Converter?

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
I was using FileZilla in its default config which has the default setting "Treat files without extension as ASCII file".  Surely, I wouldn't be the only one who's ever run into this, eh?  I can't find any one else thats run into this problem.

This is a bad bad day.

Offline Road Rash Jr.

  • Sr. Member
  • ****
  • Posts: 765
:-[
I think I pooched my forum.  I upgraded my FileZilla client some time back and have been making backups with it.  Apparently, by default, it treats files without an extension as ASCII.  Attachements in the attachment folder do not have extensions and I believe now that they were corrupted by ASCII conversion.

Does that sound right to you guys?

I don't know why they set it up like that, it's a pain in the butt not knowing what the file is because of the coding. It can't be opened or identified outside SMF. Why can't it be just like regular files????
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
As far as I know there is no way to fix it.

This problem with FileZilla is known and if I was aware that you were transferring files I would of warned you. I'm going to leave a message on the dev boards on this.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline Road Rash Jr.

  • Sr. Member
  • ****
  • Posts: 765
As far as I know there is no way to fix it.

This problem with FileZilla is known and if I was aware that you were transferring files I would of warned you. I'm going to leave a message on the dev boards on this.

Can you tell us not so knowlagable individuals what we can use that will ftp these files from SMF to puters so we can view them normally? I have the same problem though I haven't pooched my files YET!!!
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
What happened is.. 1.) I downloaded my entire site.. 2.) Made a copy of it, 3.) Unzipped RC3 into it the copy.. then 4.) uploaded it.

Offline AncientDragonfly

  • Jr. Member
  • **
  • Posts: 149
As far as I know there is no way to fix it.

This problem with FileZilla is known and if I was aware that you were transferring files I would of warned you. I'm going to leave a message on the dev boards on this.

Can you tell us not so knowlagable individuals what we can use that will ftp these files from SMF to puters so we can view them normally? I have the same problem though I haven't pooched my files YET!!!

You can use Filezilla, but first check in the Transfer-->File Types settings.  Mine has a checkbox for "Treat files without extension as ASCII file."  It's a *nix version, but the Windows version is probably similar.  Make sure the box is unchecked (if it says the same thing).

Thank you kerbob, for posting this.  This is not really an SMF upgrade problem; it's kind of a lack of knowledge/communication/prudence problem.  It's something that's good to make people aware of, though.


Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Quote
Mine has a checkbox for "Treat files without extension as ASCII file."

When you do that, How does it treat ASCII files? I don't use FileZilla and am curious.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline Road Rash Jr.

  • Sr. Member
  • ****
  • Posts: 765
Quote
Mine has a checkbox for "Treat files without extension as ASCII file."

When you do that, How does it treat ASCII files? I don't use FileZilla and am curious.

So again I will ask, what do you use so that when you dl the attackment folder to your hd you can see the files properly? Why does SMF code the attackments to something that is unviewable outside of SMF?
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Quote
So again I will ask, what do you use so that when you dl the attackment folder to your hd you can see the files properly?

If you use FileZilla, change the settings as suggested by  AncientDragonfly. If you want to view them. Either add a file extension. Or right click on it, select Open and then choose your favorite imaging program

The change to encrypted file names was done to address a security concern.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline AncientDragonfly

  • Jr. Member
  • **
  • Posts: 149
Quote
Mine has a checkbox for "Treat files without extension as ASCII file."

When you do that, How does it treat ASCII files? I don't use FileZilla and am curious.

It uploads them in ASCII format as opposed to binary format - if I remember correctly, 7 bit bytes instead of 8 bit bytes, because the so-called "high ASCII" characters are not necessary for the standard alphabet.  ASCII is for plain text readable files, and binary is for those files that are full of funny looking characters that aren't standard alphabet or punctuation.  *.php (ASCII) as opposed to *.png (binary).

More technical discussion here: http://en.wikipedia.org/wiki/Ascii and here: http://en.wikipedia.org/wiki/Binary_file (more than I want or need to know  ;) )

ASCII vs. binary is an FTP thing, not just a FileZilla thing.  Most of the graphical based FTP programs have an automatic mode, where certain extensions are set to binary or ASCII, but if you used a command line FTP client, you'd need to type which mode you need before you upload your files.

Is that what you meant?

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Sorta, I am aware of how it works. I was just curious if it will still transfer ASCII files as ASCII and not transfer them as binary.

I use CuteFTP and it has an auto mode which hasn't failed me yet.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline kerbob

  • Semi-Newbie
  • *
  • Posts: 63
Well, my FileZilla was in automatic mode, but the default settings were never changed.  I had been doing backups religiously and I did do a practice restore before I opened my forum and even did a forum move from GoDaddy to 1and1 last June 2009.  So, somewhere along the way, one of those times when I opened FileZilla and it said, "Hey, I've got an update for ya!", and I said "ok", they must have had a company shift in how they deal with files with no extensions.

I'm screwed and feel like I let the people of my forum down.  I've called 1and1 and they're going to see if they have a backup that is over 48hours old.  :-\  My forum is now in maintenance mode.

I cannot believe this has happened to no one else!!  Check your FTP clients folks!!
If anyone knows a way to convert BIN files corrupted via ASCII transfer from Unix to Wndows, please let me know.  :-[