Filefield errors when uploading a document

Got an HTTP error 0 occured { “status”: true, “data”: ….} when uploading a file to attach to a node using custom defined filefields. The following worked to solve it (as reported in http://drupal.org/node/356916#comment-3001508), but now instead of handling uploads with ajax the page refreshes after uploading the document:

I wanted to know what made the difference between the two releases and stumbled upon filefield_widget.inc
in that file, around line 271 there was something remarkeable going on.

The lines that provided the ahah wrapper where commented out !

/*    '#ahah' => array( // with JavaScript
'path' => 'filefield/ahah/'.   $element['#type_name'] .'/'. $element['#field_name'] .'/'. $element['#delta'],
'wrapper' => $element['#id'] .'-ahah-wrapper',
'method' => 'replace',
'effect' => 'fade',
),
*/

So, what I did to work things out was :

  1. Just install the latest version of the Filefield module
  2. Open up filefield_widget.inc with a texteditor
  3. and comment out the lines above.

If anyone can shed some light on to what this does and if this kills other functionalities that I’m not aware of, let me know.
But I just have to do it this way, cause nothing else would work.

Advertisements

Posted on July 8, 2010, in Uncategorized. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: