Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following error happens "ajax.module: An unknown error has occurred." when a user clicks 'submit' more than once (which happens quite often).
This is often accompanied by "This content has been modified by another user." because it things someone else is saving the form as it's being edited.
The submit button needs to be deactivated when the user clicks submit or else this will happen every time. I believe this is also the cause of various similar error with this module.
Comment | File | Size | Author |
---|---|---|---|
#3 | ajax.js_.patch | 659 bytes | leanazulyoro |
Comments
Comment #1
cerup CreditAttribution: cerup commentedI'm marking this as critical considering the number of similar issues and because this error is a deal breaker for anyone that wants to use this module in a production environment. If you feel it's not crticial, feel free to downgrade it.
Comment #2
cerup CreditAttribution: cerup commentedApologies - marking this for the dev version.
Comment #3
leanazulyoro CreditAttribution: leanazulyoro commentedI've solved this by disabling the submit button when it's first click and enabling it back again when it has finished the request. i did this in the ajax.js file. I'm attaching a patch, please review and make sure it works.
regards
Comment #4
YK85 CreditAttribution: YK85 commentedEDIT: removed as my comment was not related to this patch. Thanks
Comment #5
MustangGB CreditAttribution: MustangGB commentedSubscribing
Patch is dodgy ;D
Comment #6
crutch CreditAttribution: crutch commentedgetting today after recent core and module updates - ajax.module: An unknown error has occurred.
symptom: editing a node and clicking submit button
Comment #7
boblesurfeur CreditAttribution: boblesurfeur commentedI have the same issue..
I dynamically load a View with an argument. In this view I use Ajax pager.
When I go to the page 2 (or 3) and submit a Comment it triggers 2 or 3 times the submit form (number of trigger : nbr_page-1)
The first post works but then I have this error and it reload all my views...
Kind regards
Comment #8
dhon CreditAttribution: dhon commentedFound a solution, using the patch on #3 comment:
I've edited ajax.js located in ajax module folder,
find Drupal.Ajax.go function approx. on line 83 and replace the whole function:
this is the original:
Replace with this one:
Comment #9
sunshinee CreditAttribution: sunshinee commentedhaving the same problem, but cannot be sure it the result of clicking submit twice. is this related to http://drupal.org/node/786502? I'll test the solution in #8 and report back.
Comment #10
YK85 CreditAttribution: YK85 commentedsubscribing
Comment #11
crutch CreditAttribution: crutch commentedencountering similar issue as this one: http://drupal.org/node/1069324
----symptom
little white box on login in IE
FF6 gives AJAX error and doesn't allow login at all
Have Ajax module installed and only AJAX and AJAX UI is checked/used.
----fix
login with IE
Disabled those 2 items and everything works fine again.
Unable to use AJAX module at this point.
Comment #12
koushal CreditAttribution: koushal commentedhi,
my login - register block is working fine, but when I am trying to add user through admin panel and fill the form when I click on signup, I am getting Ajax.module: An unknown error occurred.
please help
Comment #13
brendoncrawford CreditAttribution: brendoncrawford commentedIs there a working patch for this?
Comment #14
brendoncrawford CreditAttribution: brendoncrawford commentedComment #15
soulston CreditAttribution: soulston commentedI'm getting this behaviour on D6 when submitting a webform form that has a mandatory email address field. This seems to be line 106 in ajax.js.
Maybe it's related to this issue - http://drupal.org/node/786502
Drupal 6.22
Ajax 6.x-1.15
Comment #16
jrstmartin CreditAttribution: jrstmartin commentedI always get that message on a node save, but the node always saves correctly, so I just removed the error function for it :D. I have no idea what the problem is :/. My nodes have a lot of processing that takes place. It takes maybe 10 - 15 seconds for a node to save on my site. I'm on the latest D6 (Pressflow) with Ajax Module 6.x-1.x-dev, 2011-Apr-08. I run Open Publish and use the Rubik admin theme.
Comment #17
brendoncrawford CreditAttribution: brendoncrawford commentedFixed thanks to @cluke009's contribution at https://github.com/brendoncrawford/drupal-ajax/pull/2
Comment #18
nagrgk CreditAttribution: 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 #19
karai CreditAttribution: karai commentednagrgk,
Can you explain exactly what I have to do to add json_decode function inside inc.php?
I have got this problem and I want to solve it!
Thank you
Comment #21
caspercash CreditAttribution: caspercash commentednagrgk,
can you elaborate and post here on how to solve this one?
Thanks!
Comment #22
aze2010 CreditAttribution: aze2010 commentedsubscribing