I got this error when I upload/remove a file. This is caused because the render function requires a variable passed by reference. So the fix is to change the lines of code to this:

file.inc/image.inc line 90:
$render = $function($entity_type, $entity, $field, $instance, $langcode, array($item), $display);
$element['dragndrop_uploads'] = array(
'#type' => 'hidden',
'#value' => render($render),

Comments

mavin773’s picture

Priority: Normal » Major

I would love to see turned into a patch and sent upstream, but sadly the poster is proposing modification of a CORE module and not Drag'n'Drop Uploads.

Johnny vd Laar’s picture

file.inc and image.inc are part of Drag 'n drop uploads module. (inside the modules folder).

mavin773’s picture

Oh. :P

blanca.esqueda’s picture

Issue summary: View changes

I've created a patch that includes the fix for this issue.

Please check:
https://www.drupal.org/node/2043627#comment-9911113

blanca.esqueda’s picture

I got the same/similar error again, when adding a file fields to comments.

Strict warning: Only variables should be passed by reference in file_dragndrop_uploads_process() (line 92 of /var/www/drupal/sites/all/modules/contrib/dragndrop_uploads/modules/file.inc).
Warning: unlink(/var/www/drupal/sites/default/files/test.txt): Operation not permitted in drupal_unlink() (line 2282 of /var/www/drupal/includes/file.inc).

Applied the same patch and it worked.