I'm using the upload.module for a module but from the actual upload interface, I'm getting a js error that throws the upload.module into some sort of infinite loop (the candy stripe keeps going and nothing happens in Firefox, and the Unspecified Error pops up the alert box in IE6.

Firebug is returning the following error:
Error: missing ) in parenthetical
Source File: http://{myserver}/drupal/misc/drupal.js
Line: 321, Column: 204
Source Code:
upload/js\" class=\"upload\" /\x3e\n\x3cinput type=\"hidden\" name=\"edit[vid]\" id=\"edit-vid\" value=\"10\" /\x3e\n" }

I have this running on two servers and the other server is not responding with this problem. I do know that the servers are configured the same in terms of drupal but there may be differences in php and/or apache.

Any ideas?
Thanks
-sean

Comments

sun’s picture

Which versions of PHP and MySQL are you using? (exactly)

Daniel F. Kudwien
unleashed mind

Daniel 'sun' Kudwien
makers99

simler’s picture

PHP 4.3.11
MySQL 4.0.26

caplain’s picture

Mysql Server 4.1.18_3
PHP 5.1

File attachments never complete
JS error:

missing ) in parenthetical
drupal.js (line 322)
oad/js\" class=\"upload\" /\x3e\n\x3cinput type=\"hidden\" name=\"edit[vid]\" id=\"edit-vid\" value=\"4\" /\x3e\n" });

but there is no missing ')';

it appears that 'response' in invalid in redirectFormButton() in drupal.js

Pawel Gawlowski’s picture

I have the same problem. I've 2 hosting accounts at same ISP both with drupal installed. One is uploadning files and the other not.
Both phpinfo() looks perfectly the same - the same php, webserver, mysql and all variables.
The only difference is that one of them has some web analytics script to monitor visitors and it ads a piece of javascript to each http response. I think it breaks my uploads. The response looks like this:

HTTP/1.1 200 OK
Server: IdeaWebServer/v0.40
Date: Mon, 02 Oct 2006 20:09:18 GMT
X-Powered-By: PHP/4.4.2
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Mon, 02 Oct 2006 20:09:19 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: Keep-Alive

06ab  
{ "status": true, "data": "\x3ctable\x3e\n 

...some more boring response...

type=\"hidden\" name=\"edit[vid]\" id=\"edit-vid\" value=\"174\"  /\x3e\n" }
00f2
<script type="text/javascript"><!--
document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://home.hit.stat.pl/_'+(new Date()).getTime()+'/script.js?id=.K3gkfyIY9C.S5lKmSqlIZPa78cuHoNm7HKgnR1Iiwj.57"></'+'scr'+'ipt>');
//--></script>
0

best regards,
Pawel Gawlowski
e-solutions.pl

Pawel Gawlowski’s picture

yep, that was the problem. After disabling analytics script all works fine. Use a packet sniffer like ethereal to check wheather http response is free from any additions, which breaks upload mechanism.

best regards,
Pawel Gawlowski
e-solutions.pl

mr700’s picture

For me it was the devel module - adding info about the page execution times.
BTW: It's easier to use firebug and see what the response was.

jenlampton’s picture

An old version of the google analytics module can cause the same problem.
Jen

Jalandhar’s picture

HURRAY...I Got It....

I installed the jquery update module and its fixed.

Install the jquery update from:
http://drupal.org/project/jquery_update