When a file upload is selected the jQuery Form plug in posts via an IFRAME instead of XHR, and cannot accept text/javascript. This IFRAME is used for all ajax uploads as far as I understand. This breaks the add another item functionality with filefield and imagefield. The attached patch is an ad-hoc solution until the community as a whole can decide on an appropriate way of handling this issue in the wider context of drupal's ahah framework and drupal_json.
| Comment | File | Size | Author |
|---|---|---|---|
| cck.add_another_item_js.patch | 907 bytes | dopry |
Comments
Comment #1
yched commentedOK, committed. I opened #371796: JS-'add more' incompatible with AHAH file uploads for the D7 'fields in core' equivalent.
Comment #3
quicksketchHere's the related FileField issue in which dopry discovered this problem: #369893: "Add another item" and the dreaded http 0 error.