Assuming this is the attachments module that comes with drupal (I have no idea, the module section and search on this site is miserable), uploading attachments doesn't work on Firefox. It works fine in IE, but it somehow gets lost in Firefox.

Comments

justdave’s picture

works for me in Firefox 1.5 Mac OS X, using drupal cvs tip as of this morning...

neclimdul’s picture

I had this problem but it was associated with the linkification extension for firefox. It was wrapping a span around the data. Hope this helps anyone having this problem.

behindthepage’s picture

The problem I have in FF 1.0.7 (XP) is that the upload runs and runs and never stops. Sometimes it uploads the file twice.

This is the error that appears in the Javascript Console.
Error: unterminated string literal
Source File: http://mandala.behindthepagephp.com/misc/drupal.js
Line: 319, Column: 27
Source Code:
({ "status": true, "data": "\x3cdiv id=\"fileop-wrapper\"\x3e\n\x3cdiv

It works fine in IE.

behindthepage’s picture

Another error report from the JavaScript console

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://browser/content/browser.js :: Shutdown :: line 841" data: no]

bradlis7’s picture

I think this is a problem with RC2 and earlier versions of 4.7. Have you tried RC3?

On RC2, I get the error:
Error: data has no properties
Source File: http://www.bradlis7.com/main/misc/drupal.js
Line: 318

+1 fixed

BachusII’s picture

Had the same problem in Fx 1.5.04.

Neclimdul's suggestion worked for me. (Though in my case it was a linkify script for Greasemonkey. Same code as the linkify extension.)

lafo’s picture

As suggested by Neclimdul, the problem is caused by using the "Linkify", "Linkify Plus", "Linkifier", "Linkifier Plus" Greasemonkey extensions. You can fix it by either:

  1. (recommended) excluding your site from being processed by the extension (in the FF window click Tools/Greasemonkey/Manage User Scripts... , select the problematic extension, and click Add... next to the Excluded pages textarea. Enter a mask for your page. )
  2. using a different non-conflicting txt2link extension (Linkify ting)
jonathan_hunt’s picture

I'm getting this behaviour on a new 5.1 install with default theme. Upload fails on FF 2.0.0.3 and Safari 2.0.4. The upload progress bar never ends and javascript console shows several errors. No file is uploaded.

Firebug reports:
missing ) in parenthetical
[Break on this error] x3e\x3cinput type=\"hidden\" name=\"attach-url\" id=\"edit-attach-url\" value=\"...
in drupal.js line 131

and

$ is not defined
[Break on this error] $(document).ready(function() {
in drupal.js line 2

Safari sees it slightly differently, reporting:
TypeError - Object (result of expression $) does not allow calls.
http://example.com/upload/js
line 2

and
Parse error
http://dev.rivers2.smithers.egressive.com/misc/drupal.js
line 131

line 131:

  return eval('(' + data + ');');

(Disabling javascript allows uploads to work ok.)

Chill35’s picture

I should have know it was javascript-related!
I couln't upload files in Firefox using the 'Attach' button (hence using Ajax)!! Doh!
With Drupal 4.7.

Thanks!

mhofmockel@drupal.org’s picture

Title: Upload module doesn't work in Firefox » Ajax attach function fails
Priority: Normal » Critical

I too have confirmed that AJAX is the problem here. Doesnt work with IE or firefox. What can be done?
Can't expect my users to disable java.

How did this happen? Was working fine until just a few weeks ago.

jonathan_hunt’s picture

Do you have devel.module enabled? If so, see an interaction between devel and javascipt for upload: http://drupal.org/node/131320

mhofmockel@drupal.org’s picture

No development module loaded.
I have Drupal loaded on three servers at three universities with 4.7.6 and 5.1
Only one server is showing AJAX symptoms.

AJAX symptoms are for 4.7.6 and 5.1

gracearoha’s picture

I am also having this problem when uploading file - upload keeps running but file is never uploaded

josh@pixael.com’s picture

another problem here...
upload button submit all the form... ajax doesn't work... no bar appear but the page reload and the file is uploaded

i'm running ubuntu 7.04, ff 2.0.0.3

in ie ajax work fine...

ShutterFreak’s picture

Same for me: the AJAX upload does not work at all on a clean Drupal 5.1 installation.

I tried it on FireFox 1.5/2 and MSIE 5/6, always with the same result. The upload to a temporary directory works, the AJAX upload block displays the image size and the definitive URL to the attachment (while the uploaded image is still in the temporary PHP upload directory).

My analysis is that clicking the "Attach" button seems to break the link between the
temporary file uploaded in the "file system temporary directory" (on my
system: C:\DOCUME~1\mobile\LOCALS~1\Temp\php\upload) and the final
location of the file in the Drupal file system path (defaults to files). As proof: all image upload information gets lost when clicking "Preview" or "Submit" on the node add/edit page.

The values of the 'Drupal file system path' and the 'Drupal upload temporary directory' are accessible via "admin/settings/file-system".

For the record, this issue is also under discussion in imagefield issue #123977.

Best regards,

Olivier

nschindler’s picture

+1

Doesn't work for me in FF2 or IE7. Progress bar completes, temp file is uploaded, but when submitting the node, the temp file is not moved to its proper destination. This failure is silent; nothing in Drupal's log or the PHP error log.
What DOES work is browsing for the file and submitting the node WITHOUT clicking the Attach button. For now, I've commented out lines 805 and 807 in upload.module to remove the Attach button so that nobody's tempted to use it.

-Nate

nschindler’s picture

sorry, wrong upload.module, but possibly still the same bug. :)

hipfox’s picture

Same as this problem, the AJAX upload does not work on a clean Drupal 6.0-beta3 & 6.0-beta4 installation.
But I run on another Ubuntu desktop with firefox, it's ok.

The errror occurred snapshot I post in http://drupal.org/node/194544

It seems client's environment setting trouble, but I don't know why?