Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: wattie on October 04, 2011, 10:02:17 AM

Title: [4825] Firefox 8 beta bug
Post by: wattie on October 04, 2011, 10:02:17 AM
In the Firefox 8 beta there is a bug with attachments - they download as "index.php" instead of their original filename. The contents of the downloaded file are the original attachment file. The bug do not exist in other Firefox version or browsers.
Title: Re: Firefox 8 beta bug
Post by: wattie on October 04, 2011, 10:03:14 AM
P.S. Confirmed on SMF 2.0.1 with different themes, including the default. I cleaned the cache of my browser.
Title: Re: Firefox 8 beta bug
Post by: Illori on October 04, 2011, 10:12:09 AM
this was not included in the 2.0.1 upgrade, so it is expected that it would not be fixed.
Title: Downloads in forum not working since Firefox 8.0
Post by: Tomcraft on November 08, 2011, 12:57:18 PM
Hi there,

users that have recently updated to Firefox 8.0 get all zip-files downloaded as "index.php".

Can someone confirm this?

Regards, Torsten
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: kat on November 08, 2011, 01:12:37 PM
Confirmed.

Firefox is crap. ;)

Right-click>"Save link as" it is, then.
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Illori on November 08, 2011, 01:20:55 PM
http://www.simplemachines.org/community/index.php?topic=454734

and may be related to

http://www.simplemachines.org/community/index.php?topic=451766
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Tomcraft on November 08, 2011, 01:27:58 PM
Always good not to be alone with a problem. :D

Do you think this will be solved in SMF or is this a bug in Firefox 8.0?

Regards, Torsten
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: kat on November 08, 2011, 01:28:30 PM
Added a post, there.

Ta, Shelly!
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Illori on November 08, 2011, 01:33:09 PM
most likely i think it is an smf issue but may not be fixed until the next security patch is released which may be sometime, unless the devs feel otherwise. there is also possibility that it may not be fixed in the security patch up to the devs either way.
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: kat on November 08, 2011, 01:51:55 PM
I looked at FF's MIME settings, to see if it could be changed.

But, Firefox, being the dog that it is, it seems that you can't, as far as I can see.
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Tomcraft on November 08, 2011, 05:34:10 PM
Seems like you already have a solution for this: 0004825: Firefox attachment Content-Disposition bug (http://dev.simplemachines.org/mantis/view.php?id=4825)

Regards, Torsten
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: ApplianceJunk on November 08, 2011, 09:36:09 PM
Quote from: Tomcraft on November 08, 2011, 12:57:18 PM
Hi there,

users that have recently updated to Firefox 8.0 get all zip-files downloaded as "index.php".

Can someone confirm this?

Regards, Torsten

Not just zip file, also .pdf file.

Maybe all attachment downloads?

Title: Re: Downloads in forum not working since Firefox 8.0
Post by: live627 on November 08, 2011, 11:43:29 PM
Quote from: ApplianceJunk on November 08, 2011, 09:36:09 PM
Quote from: Tomcraft on November 08, 2011, 12:57:18 PM
Hi there,

users that have recently updated to Firefox 8.0 get all zip-files downloaded as "index.php".

Can someone confirm this?

Regards, Torsten

Not just zip file, also .pdf file.

Maybe all attachment downloads?


Yeah, all of 'em.

Quote from: K@ on November 08, 2011, 01:51:55 PM
I looked at FF's MIME settings, to see if it could be changed.

But, Firefox, being the dog that it is, it seems that you can't, as far as I can see.
WHAT! >:(
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: ApplianceJunk on November 08, 2011, 11:57:12 PM
Quote from: K@ on November 08, 2011, 01:12:37 PM
Confirmed.

Firefox is crap. ;)

Right-click>"Save link as" it is, then.

What browser do you like to use?
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: live627 on November 09, 2011, 12:06:59 AM
Opera is my guess.
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: ApplianceJunk on November 09, 2011, 12:27:34 AM
Quote from: live627 on November 09, 2011, 12:06:59 AM
Opera is my guess.

I'm going to guess Safari. ;)
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: kat on November 09, 2011, 05:50:18 AM
Live wins. :)

I got pissed off with Firefox, coz every time there's a damned upgrade, none of the addons worked.

Never had that problem with Opera.

It seems a lot quicker, to me, too.
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Tomcraft on November 09, 2011, 10:25:49 AM
I have a solution for both of your problems. ;)

Addons not working anymore: Add-on Compatibility Reporter (https://addons.mozilla.org/de/firefox/addon/add-on-compatibility-reporter/)

Fix download-problem:

Apply patch to "/Sources/Display.php" as the "/Source/Attachment.php" doesn't exist: 0004825: Firefox attachment Content-Disposition bug (http://dev.simplemachines.org/mantis/view.php?id=4825)

Code (php) Select
// Different browsers like different standards...
if ($context['browser']['is_firefox'])
header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');


Regards, Torsten
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Tomcraft on November 09, 2011, 06:28:07 PM
Here is the fix for installation through the package manager.

Regards, Torsten
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: live627 on November 09, 2011, 07:09:41 PM
QuoteI got pissed off with Firefox, coz every time there's a damned upgrade, none of the addons worked.
Ah yes the utter nightmare of using version numbers to determine compatibility... why don't they check for functions? Makes sense considering FF's new release schedule.
Title: Firefox 8: Attachments download as index.php
Post by: Kolya on November 10, 2011, 04:08:48 AM
Since the release of Firefox 8 yesterday all attachments on SMF boards (including this one) download as "index.php". The file being downloaded is the actual attachment, just with a false name and file extension.

Downloads work fine on IE, Chrome, Opera. So this is likely a problem with FF8 not taking the intended mime type.

EDIT: I have successfully downloaded files from other sites (than SMF forums) with FF8, so the problem might lie in the way SMF serves up attachments.
Title: Re: Firefox 8: Attachments download as index.php
Post by: Kolya on November 10, 2011, 04:57:15 AM
Fix: In Display.php


// Different browsers like different standards...
if ($context['browser']['is_firefox'])
//header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');
header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');




EDIT: Updated to use the Opera header which works as well and doesn't produce errors
Title: Re: Firefox 8: Attachments download as index.php
Post by: Illori on November 10, 2011, 05:28:15 AM
already reported here
http://www.simplemachines.org/community/index.php?topic=454734

and here

http://www.simplemachines.org/community/index.php?topic=451766
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: kat on November 10, 2011, 05:44:41 AM
Some of them, like the tab addons, should be standard.

I'll give that a go, Tom. Is it for all versions of SMF?
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Illori on November 10, 2011, 05:46:59 AM
i would assume 2.0.* only as the bug is only reported for 2.0 version
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: kat on November 10, 2011, 05:49:21 AM
I just took a look at the xml and it seems so.

<install for="2.0 - 2.0.99">
Title: Re: Firefox 8: Attachments download as index.php
Post by: Kolya on November 10, 2011, 06:25:52 AM
I didn't see those threads but I saw and tested the patch mentioned in the second link beforehand and it didn't work here.
Simply sending FF the default content header (as seen above) does work.
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Tomcraft on November 10, 2011, 08:35:49 AM
We wrote this little mod just for 2.0.xx as we don't know if the "bug" exists in SMF 1.x.

Resgards, Torsten
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: Illori on November 10, 2011, 08:38:46 AM
i tested a 1.1.1* install in ff8 and it worked just fine from what i can tell
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: live627 on November 10, 2011, 10:30:11 PM
Can someone apply the patch here?
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: kat on November 11, 2011, 07:03:50 AM
I've pointed the admins to this topic.

Fingers crossed.
Title: Re: Firefox 8 beta bug
Post by: reschke on November 12, 2011, 04:41:12 AM
Quote from: Illori on October 04, 2011, 10:12:09 AM
this was not included in the 2.0.1 upgrade, so it is expected that it would not be fixed.

Oh my; why wasn't it included?
Title: Re: Downloads in forum not working since Firefox 8.0
Post by: reschke on November 12, 2011, 04:49:27 AM
Quote from: K@ on November 08, 2011, 01:12:37 PM
Confirmed.

Firefox is crap. ;)

Right-click>"Save link as" it is, then.

The forum software sends a broken header field, and *only* to Firefox because it attempts user-agent sniffing.

So please don't blame Firefox; if the software would have sent the same header to Chrome or Opera the result would be the same.

The issue has been known for over two months; see Mozilla Bug 685060 for the details.
Title: Re: [4825] Firefox 8 beta bug
Post by: emanuele on November 12, 2011, 05:56:48 AM
Quote from: reschke on November 12, 2011, 04:41:12 AM
Quote from: Illori on October 04, 2011, 10:12:09 AM
this was not included in the 2.0.1 upgrade, so it is expected that it would not be fixed.

Oh my; why wasn't it included?
Because apparently it's not yet fixed (see bug 4825 (http://dev.simplemachines.org/mantis/view.php?id=4825)).
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 12, 2011, 06:14:00 AM
Quote from: emanuele on November 12, 2011, 05:56:48 AM
Quote from: reschke on November 12, 2011, 04:41:12 AM
Quote from: Illori on October 04, 2011, 10:12:09 AM
this was not included in the 2.0.1 upgrade, so it is expected that it would not be fixed.

Oh my; why wasn't it included?
Because apparently it's not yet fixed (see bug 4825 (http://dev.simplemachines.org/mantis/view.php?id=4825)).

I don't know why the bug tracker says it's not fixed when it appears it was.

Come on, this isn't rocket science, right?
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on November 12, 2011, 06:17:05 AM
the fix has not been committed to svn so it is not fixed officially
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 12, 2011, 06:23:38 AM
Quote from: Illori on November 12, 2011, 06:17:05 AM
the fix has not been committed to svn so it is not fixed officially

OK; so can please somebody re-test and then commit it?

It's unfortunate that Firefox get's blamed for something that is somebody else's problem :-)
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on November 12, 2011, 06:24:54 AM
when the developers get to it they will test and commit, but even though it is committed that does not guarantee that it will be in the next release.
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 12, 2011, 06:27:08 AM
Quote from: Illori on November 12, 2011, 06:24:54 AM
when the developers get to it they will test and commit, but even though it is committed that does not guarantee that it will be in the next release.

In which case I recommend that you document the problem in an FAQ or something like that, so that users understand what the problem is and can apply the patch on their own.
Title: Re: [4825] Firefox 8 beta bug
Post by: Norv on November 12, 2011, 06:28:54 AM
Thank you, reschke!

Will do, no problem.
Title: Re: [4825] Firefox 8 beta bug
Post by: emanuele on November 12, 2011, 06:30:03 AM
/me is tired of seeing the message "Warning - while you were typing a new reply has been posted. You may wish to review your post." :P
Title: Re: [4825] Firefox 8 beta bug
Post by: Norv on November 12, 2011, 06:32:31 AM
You mean, *I* was quicker than you this time?

/me marks the event. :)
Title: Re: [4825] Firefox 8 beta bug
Post by: emanuele on November 12, 2011, 06:36:37 AM
lol

I got the message three times in a row... :P
Title: Re: [4825] Firefox 8 beta bug
Post by: Norv on November 12, 2011, 06:38:43 AM
Haha!
Well, it's an important issue at this time. But please, do state what you meant, lol.
Title: Re: [4825] Firefox 8 beta bug
Post by: neugi on November 13, 2011, 01:38:43 PM
hi,

i tried the fix suggested here:
http://dev.simplemachines.org/mantis/view.php?id=4825

but than i get problmes with the images(jpg)

can anybody confirm this?

best
Title: Re: [4825] Firefox 8 beta bug
Post by: Tomcraft on November 13, 2011, 01:45:50 PM
Can you please try my patch (http://www.simplemachines.org/community/index.php?topic=454734.msg3204458#msg3204458)?

Regards, Torsten
Title: Re: [4825] Firefox 8 beta bug
Post by: neugi on November 13, 2011, 01:56:33 PM
found the problem, there ist a space in the filename, and with the space in the filename it is not working. because the " are missing.

if removed the spaces udn replaced them with _ and now it works.

best
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 13, 2011, 02:00:30 PM
Quote from: neugi on November 13, 2011, 01:56:33 PM
found the problem, there ist a space in the filename, and with the space in the filename it is not working. because the " are missing.

if removed the spaces udn replaced them with _ and now it works.

best

Spaces require escaping as %20 in this format. Note that you can simply send the same format to Chrome, Opera, Firefox, Konqueror, and IE >= 9. No need to special case except for legacy browsers like IE <= 8 and Safari.
Title: Re: [4825] Firefox 8 beta bug
Post by: neugi on November 13, 2011, 02:11:42 PM
i know ;) but the encoding ist not avalible some files are encoded some not, it has been imported form bb

you are right, the code for opera works fine.

thx
Title: Re: [4825] Firefox 8 beta bug
Post by: forumite on November 14, 2011, 04:13:17 AM
Torsten,

Could you please explain what the .DS_Store file in that archive does? TIA.

Quote from: TomcraftCan you please try my patch (http://www.simplemachines.org/community/index.php?topic=454734.msg3204458#msg3204458)?
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 14, 2011, 04:17:14 AM
Quote from: forumite on November 14, 2011, 04:13:17 AM
Torsten,

Could you please explain what the .DS_Store file in that archive does? TIA.

Quote from: TomcraftCan you please try my patch (http://www.simplemachines.org/community/index.php?topic=454734.msg3204458#msg3204458)?

https://secure.wikimedia.org/wikipedia/en/wiki/.DS_Store (https://secure.wikimedia.org/wikipedia/en/wiki/.DS_Store)
Title: Re: [4825] Firefox 8 beta bug
Post by: forumite on November 14, 2011, 05:05:50 AM
Thanks. I didn't understand why it would be included in a patch.
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 14, 2011, 05:12:52 AM
Quote from: forumite on November 14, 2011, 05:05:50 AM
Thanks. I didn't understand why it would be included in a patch.

It's just one of these MacOS annoyances...
Title: Re: [4825] Firefox 8 beta bug
Post by: Darknico on November 14, 2011, 06:26:49 AM
Quote from: neugi on November 13, 2011, 01:38:43 PM
hi,

i tried the fix suggested here:
http://dev.simplemachines.org/mantis/view.php?id=4825

but than i get problmes with the images(jpg)

can anybody confirm this?

best

This fix work correctly or is in test?
Title: Re: [4825] Firefox 8 beta bug
Post by: forumite on November 14, 2011, 10:57:30 AM
Quote from: reschkeIt's just one of these MacOS annoyances...

Ah OK. BTW your patch worked fine - thanks. However, because I didn't know what that file was, I merely copied/pasted your code in a text editor rather than using the Package Manager.
Title: Re: [4825] Firefox 8 beta bug
Post by: tfs on November 14, 2011, 01:00:29 PM
Quote from: Tomcraft on November 13, 2011, 01:45:50 PM
Can you please try my patch (http://www.simplemachines.org/community/index.php?topic=454734.msg3204458#msg3204458)?

Regards, Torsten

It works for files that don't contain spaces in the filename, but is still broken for files with a space in the name.

For instance My_File.txt works

My File.txt downloads as "My"
Title: Re: [4825] Firefox 8 beta bug
Post by: Spuds on November 14, 2011, 01:43:41 PM
try

if ($context['browser']['is_firefox'])
header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name)));
Title: Re: [4825] Firefox 8 beta bug
Post by: Tomcraft on November 14, 2011, 01:59:05 PM
Seems to work fine! I modified the patch with the new code.

Regards, Torsten
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 14, 2011, 02:02:02 PM
Quote from: Tomcraft on November 14, 2011, 01:59:05 PM
Seems to work fine! I modified the patch with the new code.

Regards, Torsten

It's good if this fixes the current and urgent issue. But please, going forward, consider removing as much special-casing as possible, thus send the same header to all of Chrome/Opera/Konqueror/FF and IE>=9.
Title: Re: [4825] Firefox 8 beta bug
Post by: tfs on November 14, 2011, 02:25:15 PM
Quote from: Tomcraft on November 14, 2011, 01:59:05 PM
Seems to work fine! I modified the patch with the new code.

Regards, Torsten

Now it wants to name the download "My+File.txt" instead of "My File.txt"
Title: Re: [4825] Firefox 8 beta bug
Post by: Tomcraft on November 14, 2011, 02:29:27 PM
Quote from: tfs on November 14, 2011, 02:25:15 PM
[...]
Now it wants to name the download "My+File.txt" instead of "My File.txt"

Ahhh... correct! I can confirm this!

Regards, Torsten
Title: Re: [4825] Firefox 8 beta bug
Post by: reschke on November 14, 2011, 02:33:17 PM
Quote from: tfs on November 14, 2011, 02:25:15 PM
Quote from: Tomcraft on November 14, 2011, 01:59:05 PM
Seems to work fine! I modified the patch with the new code.

Regards, Torsten

Now it wants to name the download "My+File.txt" instead of "My File.txt"

I can only recommend to actually read the spec. http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.D (http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.D)
Title: Re: [4825] Firefox 8 beta bug
Post by: tfs on November 14, 2011, 08:06:39 PM
A possible fix suggested to me by Arantor...

Find in Display.php:
if ($context['browser']['is_firefox'])
header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_opera'])
header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_ie'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"');


Replace:
if ($context['browser']['is_ie8'] || $context['browser']['is_ie7'] || $context['browser']['is_ie6'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)));


Seems to work so far.  Will do some more testing.  There's still a lingering issue where on the download dialog it says.

QuoteMy File.txt
which is a: Text Document (-1 bytes)

But it said that before also.  It's not something specific added by this code.
Title: Re: [4825] Firefox 8 beta bug
Post by: Braese on November 15, 2011, 06:38:44 AM
I applied the Patch thank you. But it does not work for all files, text.log isnt working for me, text.zip is working. Any suggestions?
Title: Re: [4825] Firefox 8 beta bug
Post by: tfs on November 15, 2011, 03:46:46 PM
So far the replace on Display.php I posted above is working for me.  Anyone else trying it?
Title: Re: [4825] Firefox 8 beta bug
Post by: hartiberlin on November 17, 2011, 02:24:48 PM
So any real working solution ?

Where is the final fix ,
that can be installed via package Manager  ?

Many thanks.
Title: Re: [4825] Firefox 8 beta bug
Post by: Leemy on November 17, 2011, 03:32:02 PM
This problem also isn't limited to FF 8 Beta, is it?

I'm on FF 8, which has been released, and get the following with attachments
(http://i.imgur.com/hNa3u.png)


(http://i.imgur.com/rCpnt.png)


Is this the same? I dont see others with the .PART issue.
Title: Re: [4825] Firefox 8 beta bug
Post by: hartiberlin on November 17, 2011, 04:32:47 PM
Yes, this is the error bug !

Please can somebody from the SMF dev team finally fix it and post a fix that could
be installed via the package manager ?

Many thanks in advance.

Regards, Stefan.
Title: Re: [4825] Firefox 8 beta bug
Post by: Draffi on November 18, 2011, 02:01:13 AM
Yes...funny!

All the time, when i want to download something here from the forum (not the mod-page!) i can download the 130 KB index.php...

But curios is: since one week (or 8 days) i have the same problem with my board, too: all the attachments are applications/octet-streams!!!

AND....my board is 2 RC5 (well with some mods from 2.0.1....)

i contact my hosting-company and ANY solution here must be nice.

Thank you in advance!
Title: Re: [4825] Firefox 8 beta bug
Post by: hartiberlin on November 22, 2011, 07:15:02 PM
Okay, the final solution is here.
You only need to modify the Sources/Display.php
in 2 places.

Very easy to do.

http://portamx.com/2942/firefox-8-and-the-download-problem/

Regards, Stefan.
Title: Re: [4825] Firefox 8 beta bug
Post by: Tomcraft on November 22, 2011, 09:05:58 PM
Hi Stefan,

this new fix works perfect! Even if the file has blanks in its name. ;-)

Here is the fix for SMF 2.0.x for the package manager.

Regards, Torsten
Title: Re: [4825] Firefox 8 beta bug
Post by: feline on November 23, 2011, 05:38:18 AM
Well Tomcraft .. the problem is, that a user with FF8 can't download the fix here...  :laugh:
Title: Re: [4825] Firefox 8 beta bug
Post by: Zuki. on November 23, 2011, 11:39:30 AM
Hi All,

You can download

But on your PC you change the name  in : fix-firefox-8-download-problems.zip, and it's OK. You can used the file.

For your information, the bug is on the AevaMedia 1.4w; it's the same bug "index.php".

Best regards,
Zuki.

(Sorry for my english, I'm french)
Title: Re: [4825] Firefox 8 beta bug
Post by: OCJ on November 24, 2011, 10:31:55 AM
I tried the suggested portamx fix - didnt work - all photos and zips still downloading as index.php (avea media latest version).
Checked the edits again, clean out browser and smf cache but index.php every time???
Firefox 8, smf 2.01.


... 1 minute later

OMG
Even the fix in the zip file attachment I just found a couple of posts up is downloading as index.php    ::)
fix-firefox-8-download-problems.zip (1.72 kB - downloaded 16 times.)


QuoteYou have to made 2 small modification on the file /Sources/Display.php ...
Find:
Code: [Select]

   // Different browsers like different standards...
   if ($context['browser']['is_firefox'])
      header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');


Replace with:
Code: [Select]

   // Different browsers like different standards...
   if ($context['browser']['is_firefox'])
      header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name)));


Find:
Code: [Select]

   if (empty($modSettings['enableCompressedOutput']) || filesize($filename) > 4194304)
      header('Content-Length: ' . filesize($filename));


Replace with
Code: [Select]

   header('Content-Length: ' . filesize($filename));
Title: Re: [4825] Firefox 8 beta bug
Post by: OCJ on November 24, 2011, 10:41:23 AM
fix-firefox-8-download-problems.zip

installed as mod and ... guess what - still avea media files are all index.php.



From other thread
Yes, this fix works for Avea media 1.4w
http://www.simplemachines.org/community/index.php?topic=200401.msg3208061#msg3208061 (http://www.simplemachines.org/community/index.php?topic=200401.msg3208061#msg3208061)
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on November 24, 2011, 12:27:54 PM
that is because aeva has its own files for downloading so you should check their support thread for help fixing that mod
Title: Re: [4825] Firefox 8 beta bug
Post by: hefesto on November 24, 2011, 06:00:41 PM
Thanks guys! Latest patch at http://www.simplemachines.org/community/index.php?topic=454734.msg3214329#msg3214329 is working fine for me ;)
Title: Re: [4825] Firefox 8 beta bug
Post by: Zuki. on November 25, 2011, 04:10:11 AM
Hi,

For AevaMedia, see this post: http://www.simplemachines.org/community/index.php?topic=200401.msg3208061#msg3208061

Regards,
Zuki.
Title: Re: [4825] Firefox 8 beta bug
Post by: esc-vsb on November 26, 2011, 05:37:00 PM
somebody who has the rights to do it, please edit the bug http://dev.simplemachines.org/mantis/view.php?id=4825 and change /Source/Attachement.php to /Source/Display.php ! The fix is right, but it points us to nonexisting file, which confused the hell out of me (and as i can imagine many others)..
Title: Re: [4825] Firefox 8 beta bug
Post by: Thantos on November 27, 2011, 02:32:29 AM
In the trunk the code was pulled out of Display.php and put into Attachment.php (a new file)
Title: Re: [4825] Firefox 8 beta bug
Post by: Clara Listensprechen on November 28, 2011, 03:24:41 PM
Quote from: live627 on November 09, 2011, 07:09:41 PM
QuoteI got pissed off with Firefox, coz every time there's a damned upgrade, none of the addons worked.
Ah yes the utter nightmare of using version numbers to determine compatibility... why don't they check for functions? Makes sense considering FF's new release schedule.
I'm guessing because SMF doesn't and what's good enough for SMF is good enough for Firefox. :P
Title: Re: [4825] Firefox 8 beta bug
Post by: Leemy on December 01, 2011, 12:27:00 AM
So My understand now is there is a mod somewhere on the Mod site that fixes this FF/SMF bug? Can someone link it? thank
Title: Re: [4825] Firefox 8 beta bug
Post by: IchBin™ on December 01, 2011, 11:19:41 AM
Quote from: Leemy on December 01, 2011, 12:27:00 AM
So My understand now is there is a mod somewhere on the Mod site that fixes this FF/SMF bug? Can someone link it? thank

This should work for you.
http://www.simplemachines.org/community/index.php?topic=454734.msg3214329#msg3214329
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 17, 2011, 01:36:50 PM
Noticed this today.

Can someone, for someone who has only ever edited SMF's source code/themes, post instructions for the quickest fix that ideally does not involve editing said files?

I have never learned SMF's newer package/mod process. This might be a good time to do so if that is best  :-[
Title: Re: [4825] Firefox 8 beta bug
Post by: Krillin on December 17, 2011, 04:38:04 PM
Quote from: Tomcraft on November 22, 2011, 09:05:58 PM
Hi Stefan,

this new fix works perfect! Even if the file has blanks in its name. ;-)

Here is the fix for SMF 2.0.x for the package manager.

Regards, Torsten
Thanks for this fix, this seems to have fixed our problem, tested with Firefox 8 at the time of this posting. Thank you for your package.

Administrators:
Download the package
Upload via FTP to your-domain.com/forums/Packages folder
Go to your forums and log in
Go to Admin --> Package Manager and install the usual way

Hope this help anyone who needs help...

Get the file from this post. (http://www.simplemachines.org/community/index.php?topic=454734.msg3214329#msg3214329)

Krillin
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 17, 2011, 08:00:12 PM
Is there an Admin -> Packages -> Download Packages way?
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 17, 2011, 08:51:36 PM
on the bottom of that page you can upload the package.
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 18, 2011, 10:45:37 AM
It would be nice if you could patch SMF through the package manager, something like with Linux distros (without bouncing files around) ... I am normally very swift to pick these things up, so there must be something very counter-intuitive, or atypical about SMF's ways.

EDITED: Oh and... which file am I uploading thru the package manager? The archive itself? Or one of the xml files (probably not the package-info.xml one) ?
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 18, 2011, 11:35:59 AM
the archive, and we do issue updates though the package manager
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 19, 2011, 12:36:52 PM
Quote from: Illori on December 18, 2011, 11:35:59 AM
the archive, and we do issue updates though the package manager

Hmmm. My version/theme doesn't look like it's up to that.

Ok, the archive then...
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 19, 2011, 12:38:24 PM
if you are not using 2.0.1 you should upgrade.
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 19, 2011, 12:43:12 PM
Quote from: Illori on December 19, 2011, 12:38:24 PM
if you are not using 2.0.1 you should upgrade.

Forum version: SMF 2.0 RC4

Any chance an upgrade would overwrite changes made to the source code? When advised to make the changes (here) it would suggested updates would not likely clobber them.

PS: This may already have been said. But the top of this thread suggests this is an 8.0 "Beta" problem with FF. I'm assuming since the problem was found to be in the SMF code this could use correcting. Anyway whether FF should be more lenient or not. My version is 8.0 and not beta. Edited: actually the subject is FF 8 Beta.
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 19, 2011, 12:46:38 PM
it would override all your files, as there are changes to all files in the upgrade.

this is no longer just an issue with the ff beta
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 19, 2011, 12:50:11 PM
^Though so. I like SMF but this is problematic. Seems like once installed I can never upgrade. Maybe there is a version control with merger way?

Quote from: PS:Package upload failed due to the following error:
"Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."

Maybe those directories are not writable. Let's see if I can find them...

EDITED: Packages is writable. There is no "temp" sub directory in Packages. I'm not sure how offtopic this is. But apologies regardless.
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 19, 2011, 12:52:05 PM
make sure you have a temp folder, and you are at risk of SEVERAL security hacks by not upgrading.
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 19, 2011, 03:21:29 PM
Quote from: Illori on December 19, 2011, 12:52:05 PM
make sure you have a temp folder, and you are at risk of SEVERAL security hacks by not upgrading.

Packages/temp is writable all but publicly. Still same message. I will open a thread about my upgrade options. You guys need to be working on a non-invasive upgrade mechanism.

EDITED: The package fix in the thread is .zip format. Just pointing that out in case the upload handler doesn't understand .zip.
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 19, 2011, 03:23:37 PM
we will not do that for RC releases, which has been said many times. but we do have a package manager upgrade for stable releases.
Title: Re: [4825] Firefox 8 beta bug
Post by: I Agree on December 22, 2011, 01:42:00 PM
Quote from: Illori on December 19, 2011, 03:23:37 PM
we will not do that for RC releases, which has been said many times. but we do have a package manager upgrade for stable releases.

Oh, I was chastised into installing RC4 because I was told previous stuff was not recommended.  I wonder if I could go backwards with the install then.

Oh it looks like 2.0.1 is the only option. Is 2.0 considered stable now then? I may just do a re-install if so.
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 22, 2011, 01:44:27 PM
2.0 was considered the stable release over the summer when it came out, i would never want to run an older version as it will have security issues.
Title: Re: [4825] Firefox 8 beta bug
Post by: IchBin™ on December 22, 2011, 03:18:46 PM
Yes, SMF2.0.1 is the most recent stable version released. You can actually download any version of SMF from the downloads page by clicking on the archives link. But for all intensive purposes, you can't downgrade without restoring to old data.
Title: Re: [4825] Firefox 8 beta bug
Post by: Illori on December 22, 2011, 03:20:25 PM
Quote from: IchBin™ on December 22, 2011, 03:18:46 PM
But for all intensive purpose, you can downgrade without restoring to old data.

and if there are database changes it may cause conflicts with the old files.
Title: Re: [4825] Firefox 8 beta bug
Post by: IchBin™ on December 22, 2011, 03:21:52 PM
Sorry meant to say "can't" downgrade. Restoring to old data would mean wiping out any database changes.
Title: Re: [4825] Firefox 8 beta bug
Post by: tfs on January 23, 2014, 08:35:45 PM
Back in reply #62 of this thread I did a find/replace to fix an issue with Firefox that was happening with file attachments that had spaces in the name.  This was causing the patch for SMF 2.07 to break three times on Display.php.  I reversed the Find/Replace shown in my quote below, and then the 2.07 update was able to run without errors.

Quote from: tfs on November 14, 2011, 08:06:39 PM
Find in Display.php:
if ($context['browser']['is_firefox'])
header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_opera'])
header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_ie'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"');


Replace:
if ($context['browser']['is_ie8'] || $context['browser']['is_ie7'] || $context['browser']['is_ie6'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)));


Title: Re: [4825] Firefox 8 beta bug
Post by: Arantor on January 23, 2014, 09:06:45 PM
Funny you should mention this, we had to deal with this too on here ;)
Title: Re: [4825] Firefox 8 beta bug
Post by: tfs on January 24, 2014, 12:34:36 AM
I had a feeling it was going to bite a few people.  I'd have never had the guts to get past it without remembering (and finding) this old post with the find/replace itemized.
Title: Re: [4825] Firefox 8 beta bug
Post by: Arantor on January 24, 2014, 12:35:47 AM
Yeah, it bit us while doing the upgrade. But if you'd shouted, we could have pointed you in the right direction ;)