YaBB forum attachments not working
Now on Firefox 28. This problem started about three months ago (not sure what FF version then).
I have a YaBB forum which is used to post documents as attachments in forum entries. MS Word .doc documents work OK in FIrefox- that is when you click on a .doc attachment, you get a dialog box asking if you want to download the document. But with a .docx file (Word 2007), the ascii contents of the document are displayed on the screen, with no option to do anything with the attachment.
The forum admin settings have both .doc and .docx as allowed attachments. In IE clicking the .docx attachment, gives the correct dialog box to download the document. In Opera, clicking the .docx, gives a dialog box which asks if I want to use MS Word to open the .docx attachment.
Seems to be an FF issue with .docx which is a PK-zipped package. .doc is not a zipped package, but contains MS proprietary document format.
Pete
All Replies (9)
The most common reason for this is if the server has not been updated with the content-type settings for Office 2007 document formats. In that case, they send a default content-type (such as text/html or text/plain) and Firefox spews it out into a tab.
(Internet Explorer has a feature to check the beginning of content and override the stated content-type if it is recognized as a different content-type, but Firefox doesn't do that.)
When viewing the gibberish, if you right-click > View Page Info the General panel will list "Type" near the top, which is the content-type sent by the server.
Generally speaking, when you let users link to a file in its true location, the web server would send the content-type header. However, if your application (YaBB) uses a script to conceal the true location and push the download, then the script probably would be responsible for sending an appropriate content-type header.
I tried to research how YaBB works but ran out of time.
Thank you for your reply and the time put into your analysis. However, I have several issues with your conclusion.
First, prior to approximately 3 to 5 months ago, FIrefox correctly handled Office 2007 attachments.
Second, this problem occurs with other file types. For example, we use MEO software to encrypt some documents on our forum. This document type (.meo) is also handled incorrectly now by FIrefox, while it DID work correctly prior to 3 to 5 months ago.
Third, I have accessed both Word 2007 and .meo attachments with IE, Opera and Google Chrome. All of these other browsers correctly process the same attachments that Firefox fails to do.
My conclusion is that I must advise all users to stop using Firefox to access our forum. That is an unsatisfactory answer. Can you propose another?
Thank you.
Pete
Hi Pete, do all your Firefox users have this same problem?
Is the forum open to volunteers to take a look?
If you would like to do a bit more troubleshooting first, please try this two part test:
Create a new Firefox profile
A new profile will have your system-installed plugins (e.g., Flash) and extensions (e.g., security suite toolbars), but no themes, other extensions, or other customizations. It also should have completely fresh settings databases and a fresh cache folder. This test is answer the question "what if" you reset to factory defaults — without actually affecting your current settings.
Exit Firefox and start up in the Profile Manager using Start > search box (or Run):
firefox.exe -P
Any time you want to switch profiles, exit Firefox and return to this dialog.
Click the Create Profile button, choose a test name, and skip the option to change the folder location. Then start Firefox in the new profile you created.
Do those downloads work any better in the new profile?
Test in Firefox's Safe Mode
This will help rule out your system-level extensions as the potential culprit. Firefox's Safe Mode is a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: Diagnose Firefox issues using Troubleshoot Mode.
You can restart Firefox in Safe Mode using
Help > Restart with Add-ons Disabled (Flash and other plugins still run)
In the dialog, click "Start in Safe Mode" (not Reset)
Any difference?
When returning to the Profile Manager to start up in your normal profile, you might be tempted to use the Delete Profile button. But... it's a bit too easy to accidentally delete your "real" profile, so I recommend resisting the temptation. If you do want to clean up later, I suggest making a backup of all your profiles first in case something were to go wrong.
You can check the HTTP response headers with the Live Http Headers extension to see how the file is received by Firefox.
Hi,
This is a closed forum, but I can create a special user ID/password for you with access to a subset of the content. I will get back to you tomorrow with is info.
Pete
Pete/pas222:
A quick note, that if you want contributors here (cor-el, jscher2000) to access your site to see the problem, please private message them the log in information so others passing by won't be able to gain unauthorized access.
- PM cor-el /new?to=cor-el
- PM jscher2000 new?to=jscher2000
Thanks!
Well it was tough getting limited access to the forum, but here goes:
URL: http://herbpronaturals.ca/HerbPro/forum/YaBB.pl
User Name: dmiller
Password: twist-sWFh (case sensitive)
The folder "Demo Member" has a file with 2 .docx attachments that do not work. The folder "Diana Miller" has a file with 1 .doc attachment that does.
Let me know if you want some more types of files to play with.
Pete
The server sends the docx file as text/plain:
GET /HerbPro/forum/Attachments/Ocimum_basilicum_Declaration_of_Identity_ABC.docx HTTP/1.1 Host: herbpronaturals.ca HTTP/1.1 200 OK Date: Tue, 29 Apr 2014 07:06:43 GMT Server: Apache/2.2.24 Last-Modified: Thu, 12 Sep 2013 18:53:39 GMT Etag: "24d026f-6b4f-4e634418892c0" Accept-Ranges: bytes Vary: Accept-Encoding,User-Agent Content-Encoding: gzip Content-Length: 23027 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/plain
Izmjenjeno