if one is using a content type with audiofield/imagefield the upload through the subform does not work.


* warning: Invalid argument supplied for foreach() in /modules/node/node.module on line 504.
* warning: implode() [function.implode]: Bad arguments. in modules/node/node.module on line 508.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /includes/database.mysql.inc on line 172.

Comments

fago’s picture

Status: Active » Fixed

First of you must include this statement to your $form, if you want to use file uploads in the subform:
$form['#attributes']['enctype'] = 'multipart/form-data';

But there was also a bug in subform for file uploads, when #data_separation was on. I've fixed that by excluding files from #data_separation.

Anonymous’s picture

Status: Fixed » Closed (fixed)