1

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

EDIT:

Code

  $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/',
  );
4
  • Post the code for your managed file field please. Commented Mar 5, 2013 at 11:24
  • Yes code has been posted.
    – Muneer
    Commented Mar 5, 2013 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/… Commented Mar 5, 2013 at 12:32
  • @littledynamo I am on localhost. Ubuntu Server 11.04
    – Muneer
    Commented Mar 5, 2013 at 13:38

4 Answers 4

0

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
</IfModule>

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

0

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.

0

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.

-1

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 and acknowledge you have read our privacy policy.

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