0

I'm in Internet Explorer support hell.

I have a webform which uses Multiple File Uploads. When the form is displayed as a regular node (e.g. www.example.com/node/4), file uploads work as expected.

When the node is shown as a block on another node, file uploads fail with the message:

An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (20 MB) that this server supports.

Needless to say, all php.ini configuration options are in order, (post_max_size=128M, upload_max_size=20M, etc) and the temp folder is writable.

Uploads fail specifically on Internet Explorer 8 and 9. There is no indication in the log of anything going wrong, just the error message above.

Any ideas?

1 Answer 1

0

Turns out that I had, due to custom markup added to the webform, nested <form> tags. Per the spec, this is a big no-no. What happens in the older browsers appeared to have been that the form AJAX submission tried to use the form ID of the most recent <form> tag, which, in my case, was empty. It triggered this in file.module:

if (empty($_POST['form_build_id']) || $form_build_id != $_POST['form_build_id']) {
  // Invalid request.
  drupal_set_message(t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', 
    array('@size' => format_size(file_upload_max_size()))), 'error');
  ...
  ...

Removing the unneeded <form> tags resolved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.