Upload module's form_alter currently resets form attributes wholesale:


$form['#attributes'] = array('enctype'] => 'multipart/form-data');

This breaks other modules as any attributes, e.g. a class they might have set are overwritten.

Instead in form_alter hooks we need to set just the key in question. In this case:


$form['#attributes']['enctype'] = 'multipart/form-data';

CommentFileSizeAuthor
upload-form-alter-attributes.patch573 bytesnedjo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steven’s picture

Status: Reviewed & tested by the community » Fixed

Good catch, thanks. Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)