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.
If i have enabled Advanced CSS/JS Aggregation and i visit a node creation form then i get the error:
TypeError: Drupal.myClientsideValidation is undefined
This will to my custom omega 4 theme and the default omega 4 subtheme called ohm. The theme rubik do not have this error.
Can you give me an advice where i can look into this?
Comment | File | Size | Author |
---|---|---|---|
#15 | clientside_validation_and_advagg-2311339-15.patch | 2.44 KB | geophysicist |
Comments
Comment #1
attiks CreditAttribution: attiks commentedComment #2
Jelle_SDo you have the error when you disable the aggregation as well?
I can't seem to reproduce it (with Ohm and Advanced CSS/JS Aggregation both enabled)
Comment #3
Jelle_SComment #4
fox_01 CreditAttribution: fox_01 commentedThanks for your try to reproduce it.
For now i can't reproduce it by myself. I'm sorry but i will close the issue until i get the error again.
Comment #5
aruuska CreditAttribution: aruuska commentedI have this issue with client side validation and AdvAgg module. If I disable AdvAgg aggregation error will disappear and client side validation works fine.
I have tried many different combinations with AdvAgg configuration as well.
Is this advagg issue or client side validation issue?
Comment #6
klokie CreditAttribution: klokie commentedI saw the same issue, using Bootstrap theme along with Clientside Validation, AdvAgg, Boost, and others.
Comment #7
loze CreditAttribution: loze commentedI too am experiencing this. with advagg and Clientside Validation. It works when advagg is disabled.
Comment #8
loze CreditAttribution: loze commentedI was running an older version of CV. I upgraded to latest version and it works now. I'm an ass.
Comment #9
Cogax CreditAttribution: Cogax commentedI'm also getting this error. As klokie said, i have Clientside Validation, AdvAgg, Boost and Bootstrap Theme enabled.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedI have the same problem when AdvAgg is enabled.
Comment #11
loze CreditAttribution: loze commentedThis is back with the latest version of advagg 7x-2.13 rolling back to 2.11 fixed this for me.
Comment #12
geophysicist CreditAttribution: geophysicist as a volunteer commentedSolved by adding js setting on #after_build form rendering stage.
Comment #13
geophysicist CreditAttribution: geophysicist as a volunteer commentedSorry, forget about my previous comment and patch. Here is correct one.
Comment #14
geophysicist CreditAttribution: geophysicist as a volunteer commentedAnd the last one
Comment #15
geophysicist CreditAttribution: geophysicist as a volunteer commentedAnd last modification. If you have a lot of external scripts on your site you should be sure when clientside_validation.js runs it already knows about jquery.validate.js. If advagg is enabled would be great to have jquery.validate.js (or jquery.validate.min.js) and clientside_validation.js in 1 aggregated file. You can try to use hook_advagg_build_aggregate_plans_alter to manage file groups but easiest way just add these 2 files in 1 group directly in clientside_validation_add_js_settings().
Comment #16
kyoder CreditAttribution: kyoder commentedThis patch worked for me to get CV working with Advagg and anonymous user on the user registration form.