I am getting this error when trying to upload a photo:

Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://dev2.golfzing.com/sites/all/modules/contrib/jquery_update/replace... :: anonymous :: line 808" data: no]

It shows the AJAX icon but the page reloads and when it comes back it is blank. I tried with the Garland theme and a custom theme, any ideas?

Comments

drubage’s picture

Upgrading to 6.x.3.9 does not help :( The page is a white screen forever I am not sure why the form is submitting the normal way it should only be submitting via AJAX...

quicksketch’s picture

Category: bug » support
Priority: Critical » Normal

This is probably because you are using jQuery 1.4 on a Drupal 6 site, but without being able to check it's hard to say. I'm 100% positive this problem does not exist on stock installs of FileField and Drupal.

drubage’s picture

Agreed we are using jQuery update, etc, for some other modules that require it. Is filefield not compatible with jQuery 1.4+?

quicksketch’s picture

It is likely because of jQuery 1.4. I believe FileField is compatible with jQuery 1.4, but many modules will not be, as the jump from jQuery 1.2.6 (the D6 default) to jQuery 1.4 is huge, considering the amount of changes between the two versions. Usually I'll try to make do with jQuery 1.3.2 at most, 1.4 is too different to be very compatible with existing code.

drubage’s picture

I reverted back to 1.3 and I still have trouble. Now it submits AJAX and the page but I don't get the white screen of death. It never uploads and the new JS error is:

Error: this.parentNode is null
Source File: http://dev2.golfzing.com/misc/jquery.js?j
Line: 13

drubage’s picture

I am on 1.3 and still getting this error after browsing for a file and clicking upload:

Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://dev2.golfzing.com/sites/all/modules/contrib/jquery_update/replace... :: anonymous :: line 808" data: no]

There's lots of other jQuery on the site working perfectly, ahah, etc. Any help would be most appreciated it is obviously a critical error not being able to upload images, thanks!

quicksketch’s picture

Hm, well I'm not sure what to suggest here. I don't know how to reproduce the problem from the information given.

drubage’s picture

Version: 6.x-3.7 » 6.x-3.9

I really appreciate your help on this. I am a fairly advanced Drupal developer and this site is using a lot of contributed modules and some custom ones. I guess I am wondering if you have ever seen that error before or know what it might be related to. OR, have any idea why a form element (in this case the "Upload" button clicked after browsing for a file) would submit the whole form. Perhaps there is a conflict with another DOM element or something?

quicksketch’s picture

OR, have any idea why a form element (in this case the "Upload" button clicked after browsing for a file) would submit the whole form.

This happens when there is a JavaScript error on the page that prevents FileField from uploading via AJAX. But you probably already knew that. Any JavaScript errors on the page will need to be resolved for the AJAX upload to work properly.

drubage’s picture

I don't see any errors in the error console, any idea how I could find the errors? I am happy to pay you for some time on this one if you want to contact me directly, thanks!

bear_beavis’s picture

I got the same issues when we updated a server from lenny to squeeze (apache running php through fcgid)

Got errors in apache log :
mod_fcgid: HTTP request length 131516 (so far) exceeds MaxRequestLen (131072), referer: http://mysite.com/node/add/article

I added MaxRequestLen 20971520 in /etc/apache2/mods-enabled/fcgid.conf and now it works.

Hopes it helps.

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity. Thanks bear_beavis for your suggestions.