News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[4825] Firefox 8 beta bug

Started by wattie, October 04, 2011, 10:02:17 AM

Previous topic - Next topic

Tomcraft

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

reschke

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 [nofollow]

tfs

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.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Braese

I applied the Patch thank you. But it does not work for all files, text.log isnt working for me, hxxp:text.zip [nonactive] is working. Any suggestions?

tfs

So far the replace on Display.php I posted above is working for me.  Anyone else trying it?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

hartiberlin

So any real working solution ?

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

Many thanks.

Leemy

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






Is this the same? I dont see others with the .PART issue.

hartiberlin

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.

Draffi

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!

hartiberlin

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.

Tomcraft

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

feline

Well Tomcraft .. the problem is, that a user with FF8 can't download the fix here...  :laugh:

Zuki.

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)


OCJ

#73
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));

OCJ

#74
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

Illori

that is because aeva has its own files for downloading so you should check their support thread for help fixing that mod

hefesto


Zuki.



esc-vsb

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)..

Thantos

In the trunk the code was pulled out of Display.php and put into Attachment.php (a new file)

Advertisement: