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.
Hi,
Updating to 1.40 brings in that commit: http://cgit.drupalcode.org/clientside_validation/commit/?id=f9bc769f24be...
diff --git a/clientside_validation.module b/clientside_validation.module
index 247ce39..e918b19 100644
--- a/clientside_validation.module
+++ b/clientside_validation.module
@@ -30,7 +30,7 @@ function clientside_validation_js_alter(&$javascript) {
$clientside_validation_settings['clientsideValidation']['general']['months'][t(date('F', $date))] = $month_number;
$clientside_validation_settings['clientsideValidation']['general']['months'][t(date('M', $date))] = $month_number;
}
- $javascript['settings']['data'][] = $clientside_validation_settings;
+ drupal_add_js($clientside_validation_settings, 'setting');
}
With it, Drupal.settings.clientside_validation
is null, Drupal.myClientsideValidation
is thus null too (see clientside_validation.js@26) and custom behavior run inside clientsideValidationInitialized
can't be added (stuff like Drupal.myClientsideValidation.validators[formid].settings.highlight
).
Reverting the above fixed the issue.
Cheers
Comment | File | Size | Author |
---|---|---|---|
#3 | validators-undefined-2307377-13542088.patch | 4.18 KB | saradaprasad17 |
#2 | validatorsundefined-2307377-13542088.patch | 3.53 KB | saradaprasad17 |
#1 | validator-undefined.PNG | 60.8 KB | saradaprasad17 |
Comments
Comment #1
saradaprasad17 CreditAttribution: saradaprasad17 commentedHi ,
Am facing this js error while using minifyjs . I have fixed this . Will upload the patch .
Comment #2
saradaprasad17 CreditAttribution: saradaprasad17 commentedHi , I have uploaded the patch .
Comment #3
saradaprasad17 CreditAttribution: saradaprasad17 commentedHi All,
Have modified the code ,here's the updated patch .