First day using D7, downloaded alpha 2 release today, no patches. I created a field in content types for a file to use with a Page. I then created a new content type called resource and pulled in the existing file field.
When I try to add an attachment to the resource, I get the following screen:
http://screencast.com/t/OGVkOTc3ODMt
The message is:
An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /file/ajax/field_attachments/und/0/form-35306b043fef5e2f0fd39ce439c0722c
StatusText: n/a
ReadyState: undefined
I'm not at all familiar with AJAX, so not following - the only path /file I can find is under the module file, but there is no ajax subdirectory there.
Comments
Comment #1
everyday.nice commentedI encountered an identical issue.
A message "ajax","Invalid form POST data." was recorded in dblog.
Comment #2
burlap commentedThe same here, clean install of alpha 2.
Comment #3
burlap commentedIt's possible my hosting here is to blame, because Drupal 6 didn't work either: now both 7 and 6 work after I created a tmp folder in the directory where Drupal is installed (Drupal is inside a folder and not in the server root).
Comment #4
mwoodwar commentedHas anyone else noticed this to be especially true using Chrome? I get errors in Chrome, but not FF
Comment #5
aspilicious commentedThere is an issue bout these errors. I think they are all (unitl now) caused by providers.
Try to install the website on a localhost, and try again.
Check also php version and stuff like that
Comment #6
aspilicious commentedMaybe this issue can help #240777: Attach: An HTTP Error 0 occurred (on file upload)
Comment #7
hd commentedI can reproduce this error reliably, actually it happens all the time, with Chromium browser on Linux 32/64 bit and on Vista with Chrome browser when doing a file (image) upload based on file.module (D7 alpha 5 (and D& CVS HEAD) as it comes "out of the box") and on D6 when using the corresponding CCK (filefield) modules. The file does get uploaded though most of the time, but one gets this huge error message:
An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /file/ajax/field_image/und/0/form-ExtTDNqKX5K6Tw9XXswPUvwBWu0NTByBr9v6QSjuJ2w
StatusText: n/a
ResponseText: [{"command":"settings","settings":{"basePath":"\/","overlay":{"paths":{"admin":"node\/*\/edit\nnode\/*\/delete\nnode\/*\/revisions\nnode\/*\/revisions\/*\/revert\nnode\/*\/revisions\/*\/delete\nnode\/add\nnode\/add\/*\nadmin\nadmin\/*\nbatch","non_admin":""},"ajaxCallback":"overlay-ajax"},"ajax":{"edit-field-image-und-0-remove-button":{"wrapper":"edit-field-image-und-0-ajax-wrapper","effect":"none","progress":{"type":"throbber","message":null},"event":"mousedown","keypress":true,"selector":"#edit-field-image-und-0-remove-button","speed":"none","method":"replaceWith","url":"\/file\/ajax\/field_image\/und\/0\/form-ExtTDNqKX5K6Tw9XXswPUvwBWu0NTByBr9v6QSjuJ2w","submit":{"_triggering_element_name":"field_image_und_0_remove_button","_triggering_element_value":"Remove"}}}},"merge":false},{"command":"insert","method":"replaceWith","selector":null,"data":"\u003cdiv id=\"edit-field-image-und-0-ajax-wrapper\"\u003e\u003cdiv class=\"form-item form-type-managed-file form-item-field-image-und-0\"\u003e\n \u003clabel for=\"edit-field-image-und-0\"\u003eImage \u003c\/label\u003e\n \u003cdiv class=\"image-widget form-managed-file clearfix\"\u003e\u003cdiv class=\"image-preview\"\u003e\u003cimg typeof=\"foaf:Image\" src=\"http:\/\/d7t1.hopto.org\/image\/generate\/thumbnail\/public\/field\/image\/Far_far_north_480x270.jpg\" alt=\"\" \/\u003e\u003c\/div\u003e\u003cdiv class=\"image-widget-data\"\u003e\u003cspan class=\"file\"\u003e\u003cimg class=\"file-icon\" alt=\"\" title=\"image\/jpeg\" src=\"\/modules\/file\/icons\/image-x-generic.png\" \/\u003e \u003ca href=\"http:\/\/d7t1.hopto.org\/sites\/default\/files\/field\/image\/Far_far_north_480x270.jpg\" type=\"image\/jpeg; length=42581\"\u003eFar_far_north_480x270.jpg\u003c\/a\u003e\u003c\/span\u003e \u003cspan class=\"file-size\"\u003e(41.58 KB)\u003c\/span\u003e \u003cinput type=\"submit\" name=\"field_image_und_0_remove_button\" id=\"edit-field-image-und-0-remove-button\" value=\"Remove\" class=\"form-submit\" \/\u003e\n\u003cdiv class=\"form-item form-type-textfield form-item-field-image-und-0-alt\"\u003e\n \u003clabel for=\"edit-field-image-und-0-alt\"\u003eAlternate text \u003c\/label\u003e\n \u003cinput type=\"text\" maxlength=\"80\" name=\"field_image[und][0][alt]\" id=\"edit-field-image-und-0-alt\" size=\"60\" value=\"\" class=\"form-text\" \/\u003e\n \u003cdiv class=\"description\"\u003eThis text will be used by screen readers, search engines, or when the image cannot be loaded.\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cinput type=\"hidden\" name=\"field_image[und][0][fid]\" id=\"edit-field-image-und-0-fid\" value=\"10\" \/\u003e\n\u003cinput type=\"hidden\" name=\"field_image[und][0][display]\" id=\"edit-field-image-und-0-display\" value=\"1\" \/\u003e\n\u003c\/div\u003e\u003c\/div\u003e\n \u003cdiv class=\"description\"\u003eUpload an image to go with this article.\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\u003cspan class=\"ajax-new-content\"\u003e\u003c\/span\u003e","settings":{"basePath":"\/","overlay":{"paths":{"admin":"node\/*\/edit\nnode\/*\/delete\nnode\/*\/revisions\nnode\/*\/revisions\/*\/revert\nnode\/*\/revisions\/*\/delete\nnode\/add\nnode\/add\/*\nadmin\nadmin\/*\nbatch","non_admin":""},"ajaxCallback":"overlay-ajax"},"ajax":{"edit-field-image-und-0-remove-button":{"wrapper":"edit-field-image-und-0-ajax-wrapper","effect":"none","progress":{"type":"throbber","message":null},"event":"mousedown","keypress":true,"selector":"#edit-field-image-und-0-remove-button","speed":"none","method":"replaceWith","url":"\/file\/ajax\/field_image\/und\/0\/form-ExtTDNqKX5K6Tw9XXswPUvwBWu0NTByBr9v6QSjuJ2w","submit":{"_triggering_element_name":"field_image_und_0_remove_button","_triggering_element_value":"Remove"}}}}}] closepinpinsearchzoomoutzoominzoomin
ReadyState: undefined
IMHO: Basically this amounts to D7 file uploads based on AJAX being unusable with Chrome/Chromium browser. Other browsers work fine for me.
Comment #8
aspilicious commentedI use chrome all the time never get these errors....
Comment #9
hd commentedReplying to myself in #7: Eventually I found that the Chrome browser extension EzLinkPreview was causing the problem. Disabling the extension fixed the problem.
Comment #10
aspilicious commentedI'm going to close this as this is a duplicate of #240777: Attach: An HTTP Error 0 occurred (on file upload) in some way.
Feel free to reopen if necessary...
Comment #11
paulobsousa commentedI have this error on drupal, when i use views, i cannot create one view because this error.
Please Help.
An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: http://aaaaaaa.com/admin/views/ajax/autocomplete/tag
ResponseText:
ReadyState: 4
my website is off-line because this.
Thank,
Paulo
Comment #12
yazzz.b commentedI encountered the same problem and after much frustration found out that I don't get the error if I use Firefox. I only tested it out on Firefox 3.6, IE 8, Opera 11, and Opera 11.1beta. I also noticed I don't have any problems when I'm on a Windows XP machine, just on Windows 7. I have Windows 7 Ultimate, not sure if that matters. It's weird, I used the same versions of browsers and XP has no problems so I can't say for certain if it's really my host to blame. I would really like to know if anyone got to the bottom of this or noticed any other patterns because I need to do something since most of my users are on IE and Windows 7. Although I haven't actually tested it out on other Win 7 machines. Will do more testing and post an update soon.
Comment #13
rodrigoaguilerasub
Comment #14
zopa commentedi'm running Drupal 7.10 on PHP 5.2.17 -- i get this error message when i try to upload an image:
An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /?q=file/ajax/field_image/und/form-3F2eSnm6KPiqWLfcTEmPmVbQ0k9Vm4JXg0DPPB0CaIE
StatusText: n/a
ResponseText:
Fatal error: Call to undefined function file_mimetype_mapping() in /home/mangalas/public_html/DRUPAL7/includes/stream_wrappers.inc on line 316
ReadyState: undefined
i'm new to Drupal and at a total loss - can someone please help?
my drupal installation in a subdirectory off root
Comment #15
xjmHi zopa,
This issue is closed and related to a specific issue. I'd suggest opening a separate issue or creating a forum post. (To help troubleshoot, exact steps to reproduce from "Install Drupal 7.10" would also be a good idea, in that separate post.)
Comment #16
ericwenger commentedI was also getting this error. What worked for me was the solution suggested here:
Comment #17
ericwenger commentedI guess I can't post links yet, so go to:
montenasoft(dot)com
and do a search for:
500 internal server error
The post that comes up is the answer (at least for me)
Comment #18
featherbellyI am getting something similar when clicking "remove" on an uploaded file link (an image). I have tried the same build on 2 other servers and it works fine... But not on the production server!!! The error does not seem to give much indication of what I should do. If anyone has any pointers!!
Type ajax
Date Friday, 27 January 2012 - 7:00am
User administrator
Location http://test.titanblack.co.uk/file/ajax/field_defaultimage/und/0/form-IJU...
Referrer http://test.titanblack.co.uk/node/250/edit
Message Invalid form POST data.
Severity warning
If I check the location this is what is there:
Comment #19
TheOptimizer commentedI have encountered this error as well. And indeed, there seems to be no solution for this, till I digged a bit deeper.
Probably your PHP runs as FastCGI application. Then probably you are affected by this:
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen
In FastCGI, for some reason, the default value has changed from 1GB to 130kB as you can read on the link above:
You should have following error in your error.log:
[Thu Feb 09 19:01:04 2012] [warn] [client 81.164.155.215] mod_fcgid: HTTP request length 131860 (so far) exceeds MaxRequestLen (131072), referer: .........There are 2 ways you can solve this: change FastCGI or make PHP run as apache module. Here I explain how you can change your server configuration.
You should add following to your server config or virtual host config:
You cannot add this to your .htaccess file, so you will need to have access to your server.
Please let me know if this helps.
Comment #20
sainf commentedThanks TheOptimizer!!
Putting "MaxRequestLen 20000000" in the virtualhost file work perfect.
Using Drupal 7.14.
Comment #21
ownage commentedWorked for me as well! Thanks for the help!
For those still having trouble, make sure to restart your server after changing the file so the changes can take place.
Comment #22
wmad commentedIncreasing PHP memory size to allow it to resize large images worked for me. See http://drupal.org/node/372865
Comment #23
allenshorter commentedFor me the issue was related to FastCGI.
Saw this in my server log....
mod_fcgid: HTTP request length 16778734 (so far) exceeds MaxRequestLen (16777216)
I turned off FastCGI using Parallels on my server using the opposite of the instructions here...
http://kb.mediatemple.net/questions/1890/%28dv%29+How+do+I+enable+FastCG...
Hope this helps someone. There is a way to do this with FastCGI still on, but I was having other issues so I decided to turn it off.
Comment #24
pipep commentedFor me the problem was solved by changing the value of "max_execution_time" to "0", on the php.ini file.
Comment #25
defconjuan commentedTheOptimizer #19 was exactly the fix in our case. Thanks, I added this solution to a few of the other posts on this topic http://drupal.org/node/1015938#comment-
Comment #26
ranvel commented#4 worked for me! I loaded it up in FireFox and everything worked 100%!
Thanks for the fix!
Comment #27
rooby commented@pipep in #24:
I would recommend not doing that.
That means that any request to your site can run indefinitely, which could end up killing your server.
At least set some sort of limit, even if it is large, like 300 (5 minutes) or something.
If someone's connection is too slow to be uploading a file in 5 minutes then it is quite likely they should be using a faster connection or uploading a smaller file (at least in most cases).
Comment #28
defconjuan commentedEpic. That's like chopping off a leg to fix a broken toe.
Comment #29
pjbarry21 commentedThis is an old issue, but thought I'd post here since I had almost the identical error in 7.22 recently.
The fix that worked for us was using jQuery Update, WITH the patch from here: https://drupal.org/node/1995790#comment-7553275.
It updated the jquery.form.js and jquery.form.min.js files/versions that jQuery Update uses. Prior to the patch, jQuery Update version 7.x-2.3 alone did not solve the issue -- post patch, it appears to be working.
Comment #30
smatron commentedhow i would add this virtual host config in godaddy
Comment #31
Sahin commented#19 explains the problem and the solution very well: if you get the
"500 Internal Server Error"(during an update or the installation of Drupal or a module etc.) and you read[date etc...] ... mod_fcgid: HTTP request length ... exceeds MaxRequestLen (...), referer:...in your Apache error log, which was my case, then the solution is most probably #19, thanks to TheOptimizer.I can only add that while editing your config file (e.g. conf/httpd.conf) be careful to use the same name/alias given for the fcgid module, i.e. if the module is loaded by
then you have to add
<IfModule fcgid_module>...not
<IfModule mod_fcgid.c>...Comment #32
JohnnyW commentedI tried all of these fixes... MY fix was....
I have a settings.php $base_url WITH the 'www'
Then in .htaccess file (root of folder), I un-commented (removed the hashtag):
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Error is gone.
Thanks for Drupal community guidance!
Comment #33
sjiuh commented@TheOptimizer #19
Solid gold! thanx a million!
Comment #34
aharown07 commentedFor NGINX users....
I was getting the same (or very nearly) error uploading audio files larger than 1MB.
There is a max body parameter that needs to be adjusted in nginx.conf
Details here:
http://jesin.tk/fix-client-intended-to-send-too-large-body-nginx-error/
Short version: find your nginx.conf file.
add or modify the following line inside http {…}
client_max_body_size 20M;
Worked for me.
Comment #35
Ectopod commentedJust went through a few weeks of trying to fix the exact same issue. In our case, the problem was caused by the Suhosin PHP extension. That extension was limiting GET and POST requests in a way that was breaking almost any Drupal feature using AJAX. Thought I would mention that here in case it helps anyone else.
Comment #36
jlpz commentedEctopod how the hell did you figure this out?????? ive tried everything and finally found your comment after searching for a long time. Thanks so much!!!!!!
Comment #37
firel0rd commentedThe solution in #35 worked for me as well. Thank you.
Comment #38
kevinnivek commentedFor me adding this to my mysql config (/etc/my.cnf) file fixed the problem :
max_allowed_packet=16M
Though it may be useful to ensure that your web server, php.ini and other related service configs are also accommodating php request, post size, memory limits, upload size and other related functions.
Comment #39
randa.elayan commentedThank you Ectopod for your reply. I have a question, what did you do do with Suhosin? disabled it or what?
Comment #40
crane_cio commentedI just ran into this same issue and found a different solution to this problem.
We are on a share hosting platform with Nexcess.net and it turns out that this was caused by a Mod Security rule being tripped.
I was able to talk to the support team and have them create a mod security exception that allowed image and file attachments via AJAX to work.
Comment #41
anavrin commented# 20MB should be enough
MaxRequestLen 20000000
I added this to my vhost configuration at it did the trick :)
Actually in my case I made it 200MB
so:
MaxRequestLen 200000000
Thanks Smatron #30 - it helped.
Comment #42
amonphp commentedDear Sir,
all you have to do is make the host php version the same as the one on your localhost
Comment #43
aniket.mohite88 commented#35 worked for me.
Suhosin PHP extension in the PHP settings of my cPanel caused the issue. Disabling (de-selecting) the same resolved the issue.
Thanks.
Comment #44
mcollins78 commentedI have the exact same issue as #18. The only way for me to remove an image is to disable java in the browser. Does anyone know what the issue could be?
Comment #45
garchris commentedThe solution for me (proposed by my Upwork freelancer Shikha rani) was to add Header always set X-Frame-Options "sameorigin" in .htaccess
Comment #46
shiks commentedThank You Garette for giving me credit here. @GarChris :)
Comment #47
anlop commentedThank you @theoptimizer !!
Comment #48
tonysbag commented#29 Oh god! U literally save my ass!I had try all solutions listed above,and it didn't work!Until I med ur solutions!Thanks!
Comment #49
avpadernoComment #50
ajv009 commentedI have this crazy HTML getting added to my response header which causes parseerror, anybody got any idea what could be causing this, what functions and stuff should I be looking for? it only happens with a certain page not with other forms with file upload!
Comment #51
Terrafire commented#29 solved it for me. Thank you, @pjbarry21 !!
(Though of course it's been 9 years since the original post, so we can just update the jQuery Update plugin normally, and don't need to apply any special patches anymore.)