I am getting following error while using managed file through my custom form.

"An Ajax HTTP request terminated abnormally."

Also, I updated my jquery version to latest using jquery_update module. Still no any benefit.

Any idea on how to solve it?

enter image description here



  $form['path_image'] = array(
    '#title' => t('Image'),
    '#type' => 'managed_file',
    '#description' => t('The uploaded image will be displayed on the page unless it is marked as "removed".'),
    '#default_value' => $current_image,
    '#upload_location' => 'public://subpage_banner/',
  • Post the code for your managed file field please. – littledynamo Mar 5 '13 at 11:24
  • Yes code has been posted. – Muneer Mar 5 '13 at 12:01
  • Code looks fine. Are you working on localhost or via a hosting provider? Is it possible that Fast CGI is being used? See this article montenasoft.com/en/blog/… – littledynamo Mar 5 '13 at 12:32
  • @littledynamo I am on localhost. Ubuntu Server 11.04 – Muneer Mar 5 '13 at 13:38

MaxRequestLen sometimes gets lowered as a result of server/module updates. Also, adding modules that add to the request length can also introduce this problem. This is why disabling modules can sometimes "fix" the problem.

See http://drupal.org/node/1015938#comment-7412202 for a solution that involves updating your vhost file, eg:

<IfModule mod_fcgid.c>
  # 50MB
  MaxRequestLen 52430000

Or try switching from FastCGI to mod_php or php-fpm (if you're using FastCGI).


Anyone having lots of AJAX issues might want to try disabling the jquery_update module. It is because some modules and library scripts work with different versions of jQuery.


One reason for this error may be permissions. Please check that the upload AJAX menu item has the right access argument $items['file/ajax']['access arguments'] and no module else hooks and changes its default value.


It's a jquery_update issue. Check with lower version of jquery.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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