The new AJAX/JSON form upload voodoo hangs with the new Drupal CVS: the actual error is caused by a security error (NS_ERROR_XPC_BAD_CONVERT_JS) in misc/drupal.js, function parseJson(). The eval() call seems to hang ...

If any more information is needed please get in touch. I can't quite figure out what's going wrong.

CommentFileSizeAuthor
#6 drupal.js_6.patch753 bytestenrapid
#1 drupal.js_5_0.patch779 bytesZen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Zen’s picture

FileSize
779 bytes

A patch for this by tenrapid from a dupe issue: http://drupal.org/node/55518#comment-83648

Please use this issue to handle this as it is the earliest report. And this is not critical :)

-K

Zen’s picture

Status: Active » Needs review

For the record, I cannot reproduce this in FF 1.5 on Linux and FF 1.5.0.1, Opera 8.51 and IE 6 on XP SP2.

-K

dww’s picture

i can reproduce this with FF 1.0.6 on OSX (i just ran into this bug while trying to test something else, and came looking to see if it had already been reported). unfortunately, the patch to drupal.js doesn't appear to solve the problem, even after clearing my browser cache (assuming that's a good way to force the new version of drupal.js to be used). definitely not an issue w/ safari... uploads work like a charm there. i'd be happy to test other proposed solutions to this bug. i'm not a JS person, so i can't really fix it myself, or comment on the validity of the proposed drupal.js change, but i can say for sure that after applying drupal.js_5_0.patch, uploads are still hanging in FF 1.0.6 after pressing "attach". :( sorry i can't be more help at the moment.

-derek

dww’s picture

Status: Needs review » Needs work

changing the status... this patch needs work (should have done this w/ my previous post... sorry).

dww’s picture

Title: upload.module broken in Linux on Firefox 1.0.7 » upload.module JavaScript broken on Firefox 1.0.x

changing the title, too, since this isn't specific to 1.0.7 or linux, but it is specific to JS.

i do think this is critical, but i'm not going to get into a war w/ zen over that. ;) i'd just vote for fixing this instead of forgetting about it. as i said before, i'm happy to help test new patches, and i'll keep my eye on this issue. thanks.

tenrapid’s picture

FileSize
753 bytes

After checking this again I found that Firefox 1.0.x randomly had replaced spaces with an '\n\r' pair in the returned JSON object from .innerHTML.

So here's a new patch that replaces all control characters with a space.

Derek, if the problem persists, could you please post your Javascript Console output?

killes@www.drop.org’s picture

Status: Needs work » Needs review

I can confirm the bug and that the path fixes it. Steven, can I get your opinion on this?
Do we need the comment about firefox in the code?

killes@www.drop.org’s picture

Status: Needs review » Fixed

ok, the comment is in line with the rest of the file. applied.

dww’s picture

indeed, the version committed to cvs fixes the problems i was seeing. thanks, y'all.

-derek

Anonymous’s picture

Status: Fixed » Closed (fixed)