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.
On IE, with Clientside Validation 1.33 installed, any drupal form using ajax with clientside validation loaded into memory will fail on ajax.js's try/catch, and gives the error "An error occurred while processing /system/ajax:" with a blank error message. Downgrading to 1.31 solved the issue.
Comment | File | Size | Author |
---|---|---|---|
#5 | i1669960-5.png | 8.77 KB | attiks |
Comments
Comment #1
attiks CreditAttribution: attiks commentedCan you clarify "any drupal form using ajax with clientside validation loaded into memory will fail", do you mean with for example a file upload?
Comment #2
cviccaro CreditAttribution: cviccaro commentedSorry, should have been a bit more articulate. The reason I say "any drupal form with ajax will fail" is because every form, be it webform or FAPI, that included an #ajax property, would immediately throw a JS alert, and this is the block of code in ajax.js it is failing on:
The execution reaches the call to ajaxSubmit ("ajax.form.ajaxSubmit(ajax.options)") where it fails, but the error message is blank. Additionally, at least in the limited capacity I have to console.log using IE, it seems the ajax JS object is fully initialized, and ajax.element and ajax.options are both defined.
It is odd!
Comment #3
attiks CreditAttribution: attiks commentedDo you have an example form so we can test this?
Comment #4
cviccaro CreditAttribution: cviccaro commentedSure: http://common.jpecatalogs.com/drupal/ has a form that illustrates this bug on the front page. This site is a sandbox purely for testing purposes; I had moved the module that defined this specific form from a site we are building onto this sandbox to ensure I could replicate the same issue.
Comment #5
attiks CreditAttribution: attiks commentedI tried this with IE9 and it's working, so what version of IE isn't working?
What version of Drupal are you using, 7.14?
I did a quick comparison between dev version and 1.31 version, most of the changes are comments, horizontal tab support, extra validators, ...
What I sometimes do see is the following, but this is a core bug (#811542: Regression: Required radios throw illegal choice error when none selected and probably not related:
Can you provide me the code of that form so I can do some debugging?
Comment #6
cviccaro CreditAttribution: cviccaro commentedYou're right--it does work in IE9. IE7 & IE8 are where I am encountering this issue, even just switching to IE8 mode in IE9 F12 tools will replicate the issue. The form in question has some table data that I'd rather not transfer over, so here is a similar module developed side-by-side that shows the same issue: http://common.jpecatalogs.com/libs/drupal/roi_calculator.tar
Comment #7
attiks CreditAttribution: attiks commentedThis was fun to debug, apparently there's a bug inside jquery.form.js that's having trouble with the added prototype functions we add in clientside_validation.ie8.js, those were added to the ajax.options.data as well, but the jquey.form.js was having trouble with it.
Quick solution: download the new version from http://malsup.github.com/jquery.form.js and put in inside /misc
Can you try it and let me know if it works, if it does I'll try to find a way to add it from inside clientside_validation?
Comment #8
cviccaro CreditAttribution: cviccaro commentedWell, I appreciate the work, and I can confirm this fixes the problem. I had to replace it at sites/all/modules/jquery_update/replace/misc, though, so perhaps only jquery_update needs modified/fixed and not clientside_validation.
Comment #9
attiks CreditAttribution: attiks commentedI added a new general setting to override the jquery.form.js version to v3.09, it works without the jquery_update module, but isn't tested when jquery_update is installed.
Issue opened against jquery_update: #1675794: Update jquery.form.js - older versions break in IE8
Comment #10
diggingrelic CreditAttribution: diggingrelic commentedI had the same issue and this fix worked for me. Thank you! I also replied in the issue against jquery_update.
Comment #12
sumaiyajaved CreditAttribution: sumaiyajaved commentedi replaced the jquery.form.js in my misc folder and do not have jquery_update as I am using drupal 7 but this did not solve the issue for me ... any help :( ??
Comment #13
dahousecat CreditAttribution: dahousecat commentedI'm experiencing the same issue. I updated jquery.form.js but this did not solve the issue. Downgrading to 1.31 was the only solution that worked for me so just going to stick with that.