This is a posting for those familiar with the problem of ahah helper module and the upload fields which don't go together very well. It's the already famous
An HTTP error 0 occurred. ?q=blah blah
The issue seems to be the old jquery.forms library present in the drupal distribution. following some advice found on other threads ( http://drupal.org/node/659206#comment-2889942) i found that indeed ugrading the library to a newer version solves the problem of file uploads .
HOWEVER
in the new library a strange error appeared : having ahah contents in nested fieldsets ( 2'nd level nesting -i.e. fieldset in fieldsed- and beyond) doesn't trigger the events properly. After some debugging i found that the content of the fields just doesn't get sent to the server. I don't know why this is happening but here is a workaround: I patched up a frankenstein version of an older jquery.forms library ( just a little newer i believe than the one that comes with drupal ) and the one downloaded from the jquery website. I copied the function that deals with file uploads from the new one into the old one, leaving the rest unchanged.

This is rather a jquery issue...

here are the 2 new files you need. you can't use the jquery.forms without the main library, it doesn't work.

CommentFileSizeAuthor
jquery&jquery.forms_.zip40.31 KBcodeglyph

Comments

lilwiki’s picture

Thanks a bunch. Seems to have rectified the problem.