Advertisement:

Author Topic: [4825] Firefox 8 beta bug  (Read 49076 times)

Offline Tomcraft

  • Jr. Member
  • **
  • Posts: 135
Re: [4825] Firefox 8 beta bug
« Reply #60 on: November 14, 2011, 02:29:27 PM »
[...]
Now it wants to name the download "My+File.txt" instead of "My File.txt"

Ahhh... correct! I can confirm this!

Regards, Torsten

Offline reschke

  • Semi-Newbie
  • *
  • Posts: 24
Re: [4825] Firefox 8 beta bug
« Reply #61 on: November 14, 2011, 02:33:17 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]

Offline tfs

  • Full Member
  • ***
  • Posts: 443
  • Gender: Male
Re: [4825] Firefox 8 beta bug
« Reply #62 on: November 14, 2011, 08:06:39 PM »
A possible fix suggested to me by Arantor...

Find in Display.php:
Code: [Select]
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:
Code: [Select]
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.

Quote
My 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.

Offline Braese

  • Newbie
  • *
  • Posts: 5
  • Gender: Male
  • I'm a llama!
Re: [4825] Firefox 8 beta bug
« Reply #63 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?

Offline tfs

  • Full Member
  • ***
  • Posts: 443
  • Gender: Male
Re: [4825] Firefox 8 beta bug
« Reply #64 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?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline hartiberlin

  • Full Member
  • ***
  • Posts: 679
  • Gender: Male
    • overunity.com the International free energy research forum
Re: [4825] Firefox 8 beta bug
« Reply #65 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.

Offline Leemy

  • Full Member
  • ***
  • Posts: 443
Re: [4825] Firefox 8 beta bug
« Reply #66 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






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

Offline hartiberlin

  • Full Member
  • ***
  • Posts: 679
  • Gender: Male
    • overunity.com the International free energy research forum
Re: [4825] Firefox 8 beta bug
« Reply #67 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.

Offline Draffi

  • Jr. Member
  • **
  • Posts: 268
Re: [4825] Firefox 8 beta bug
« Reply #68 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!

Offline hartiberlin

  • Full Member
  • ***
  • Posts: 679
  • Gender: Male
    • overunity.com the International free energy research forum
Re: [4825] Firefox 8 beta bug
« Reply #69 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.

Offline Tomcraft

  • Jr. Member
  • **
  • Posts: 135
Re: [4825] Firefox 8 beta bug
« Reply #70 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

Offline feline

  • SMF Hero
  • ******
  • Posts: 1,638
  • Gender: Female
Re: [4825] Firefox 8 beta bug
« Reply #71 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:

Offline Zuki.

  • Sophist Member
  • *****
  • Posts: 1,308
  • Gender: Male
  • SMF 2.0.5
    • F T Z - Forum Train Zuki
Re: [4825] Firefox 8 beta bug
« Reply #72 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)


Offline OCJ

  • Full Member
  • ***
  • Posts: 494
  • Gender: Male
Re: [4825] Firefox 8 beta bug
« Reply #73 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.)


Quote
You 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));
« Last Edit: November 24, 2011, 10:35:23 AM by igirisjin »

Offline OCJ

  • Full Member
  • ***
  • Posts: 494
  • Gender: Male
Re: [4825] Firefox 8 beta bug
« Reply #74 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
« Last Edit: November 25, 2011, 01:12:12 AM by igirisjin »

Offline Illori

  • Support Specialist
  • SMF Legend
  • *
  • Posts: 52,941
Re: [4825] Firefox 8 beta bug
« Reply #75 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

Offline hefesto

  • Senior Translator
  • Jr. Member
  • *
  • Posts: 172
  • Beati Hispani quibus bibere vivere est
    • Isidrao on Facebook
    • isidrobaq on LinkedIn
    • @isidrobaq on Twitter
    • Joomgouts
Re: [4825] Firefox 8 beta bug
« Reply #76 on: November 24, 2011, 06:00:41 PM »

Offline Zuki.

  • Sophist Member
  • *****
  • Posts: 1,308
  • Gender: Male
  • SMF 2.0.5
    • F T Z - Forum Train Zuki
Re: [4825] Firefox 8 beta bug
« Reply #77 on: November 25, 2011, 04:10:11 AM »


Offline esc-vsb

  • Newbie
  • *
  • Posts: 3
Re: [4825] Firefox 8 beta bug
« Reply #78 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)..

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: [4825] Firefox 8 beta bug
« Reply #79 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)