- Issue created by @aaronpinero
I am familiar with "jquery" but i've not heard of "jguerv"or "jguery". What are they?
- Assigned to deborahblessy
- Issue was unassigned.
- 🇮🇳India deborahblessy
Hi @aaronpinero
You are getting the conflict issue(TypeError) because the jquery.validate.min.js is being loaded from CDN by default from the ClientSide Validation module.
Solution to this issue:
We should have the jQuery library with web/libraries/jquery-validation.
Instead of doing manually please do follow below step to fix it:
1. Add the below things in composer.json file
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"npm-assets": {
"type": "composer",
"url": "https://asset-packagist.org"
}
},
and
"extra": {
"installer-types": [
"npm-asset"
],
...............
within installer paths,
"installer-paths": {
"web/core": [
"type:drupal-core",
"type:npm-asset"
],
.........................2. Require following composer dependencies.
composer require oomphinc/composer-installers-extender
composer require npm-asset/jquery-validation:^1.17
3. If you face any issue on site, Please remove composer.json and vendor folder. Then run composer install command.
4. Now you will be able to see the node_modules folder outside web.
5. Please copy jquery-validation folder and place it inside web/libraries folder. Please ensure proper permission added.
6. Now the validation will be handled from js file in the libraries folder. You will be able to apply ckeditor things without console errors.Note: After everything is setup successfully, you can remove node-modules folder and json file outside the folder.
Please let me know if you tried the above steps and post your comments.
- Status changed to Needs review
over 1 year ago 6:24am 2 September 2023 - Status changed to Active
over 1 year ago 4:28am 4 September 2023 - Status changed to Needs review
over 1 year ago 6:22pm 4 September 2023 - Status changed to Postponed: needs info
over 1 year ago 6:37pm 6 September 2023 - 🇺🇸United States smustgrave
@aaronpinero could you provide some additional info.
#2 mentions not super familiar with jguery
#6 offers some guidance too.
- 🇺🇸United States aaronpinero
@deborahblessy Thank you for your suggestion regarding loading the jQuery library from CDN vs. requiring the library in composer. That might have fixed the issue. I need to do a more thorough check, but a quick test seems to indicate the console errors are gone.
The original problem description had some typos because I copied the text from a screen capture. I guess OCR still has issues in 2023.
- 🇵🇱Poland lamp5 Rzeszow
#6 works for me, thx. I had the same problem on Drupal 9.4 and Clientside validation
- Status changed to Needs work
over 1 year ago 11:56am 18 September 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
That sounds like a wrong asset library definition.
I bet that https://www.drupal.org/node/3293812 → , which shipped in 9.5, indirectly is exposing this.
#3324062: [Regression] Changes to Drupal.ajax in 9.5.x have caused regressions in paragraphs_features module → is another example of this.