Active
Project:
Ajax
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2010 at 13:23 UTC
Updated:
13 Jul 2013 at 02:23 UTC
When submitting a webform I get the following error, but the form details do get submitted so I'm guessing it's something to do with the redirection. I have tried the disable redirection option but that's made no difference.
ajax.module: An unknown error has occurred.
also if I inspect the element the error is
error [
XMLHttpRequest
, "parsererror", "Invalid JSON: { "status": true, "updaters": [ ], "debug": [ ], "messages_error": [ ], "messages_status": [ ], "messages_warning": [ ], "redirect": "http://example.com/newsletter?sid=2072\x2685081914=1", "preview": null, "form_id": "webform_client_form_1874", "options": { "enabled": true, "disable_redirect": true, "remove_form": true } }"]
Comments
Comment #1
codekarate commentedI am getting this same error message. It also appears that when looking at the AJAX calls, the form is attempting to submit twice.
Comment #2
codekarate commentedI figured out why my form was submitting twice and was able to resolve that issue. It was being caused by me calling "Drupal.Ajax.init();" at the top of my javascript file, it is not needed. I am not sure why I put it there in the first place but I think another issue may have suggested it.
If you do not want the form to redirect at all, you can try the following that worked for me, however you will have to edit the ajax.module file.
Go to ajax.module around line 340 and change
To
Keep in mind that this will disable redirects completely so none of your forms use the Ajax module will redirect after submitting. I also have not fully tested everything to ensure that it will not cause any other issues although it seems to work fine for me.
Comment #3
nagrgk commentedGuys , i understood where exactly this error is loading from. The ajax error due to parsing error. The function of form_set_ error is working with jquery 1.3 ver .Its doesnot support laest versions .So, W e need o add json_decode function in inc.php which will solve ajax login/register error. If you have more questions , reply on same
Comment #4
voughndutch commentedI think that I am having this issue, can you shed some light on how to fix this?
Comment #5
ROBERT DEL ROSSO commentedPeople, I’m guessing you are getting this “ajax” error when creating web sites. But I am getting: “ajax.module an unknown error has occurred” when I am just posting a comment to an article on economist.com.
I have posted comments on that website for over 3 years, and never had this problem. Can anyone tell me why I have this error message now and how I can eliminate it? Thanks!
Comment #6
ROBERT DEL ROSSO commentednagrgk, I’m guessing you are getting this “ajax” error when creating web sites. But I am getting: “ajax.module an unknown error has occurred” when I am just posting a comment to an article on economist.com. I don’t even KNOW Javascript!
I have posted comments on that website for over 3 years, and never had this problem. Can you tell me why I have this error message now and how I can eliminate it? Thanks!