Tagged: checkout, enfold, jquery error, woocommerce
-
AuthorPosts
-
February 20, 2022 at 12:26 pm #1341470
We are still seeing a JQuery Not Defined error on checkout pages:
Sorry I have put the wrong version name in the support ticket title.
Version is 4.8.9.1 – Current version.Example in private content. (Please add something to the basket first then go to checkout)
Is this on the radar for Enfold Version 4.9?
Error in console
Uncaught ReferenceError: jQuery is not defined
ad (index):615:4I am seeing this error on all of my Enfold Ecommerce sites. It does not seem to affect the checkout process so luckily users can still pay for goods.
- This topic was modified 2 years, 9 months ago by thinkjarvis. Reason: Wrong version of Enfold in Ticket Title
February 20, 2022 at 6:44 pm #1341521Hey Thomas,
Thanks for the link to your site, the JQuery Not Defined error is due to this custom script:(function($) { // wait until everything completely loaded all assets $(window).on('load', function() { // remove the click event $( document.body ).off( 'click', 'a.woocommerce-terms-and-conditions-link' ); }); }(jQuery));
I see the script has a comment // wait until everything completely loaded all assets but since since jQuery 3.5.1 (window).on(‘load’ is deprecated.
Try window.addEventListener instead like this:// wait until everything completely loaded all assets window.addEventListener('DOMContentLoaded', function() { (function($) { // remove the click event $( document.body ).off( 'click', 'a.woocommerce-terms-and-conditions-link' ); }); }(jQuery)); });
So check your functions.php for this script and adjust.
Best regards,
MikeFebruary 20, 2022 at 9:53 pm #1341540Thanks Mike for going above and beyond.
I think this is caused by a mod I made to the search script. Using a snippet from another forum post.
I’ll check the file and report back.
EDIT: See resonse below. Custom Code is fine. No custom JS in fuctions file. This is caused by Enfold see my latest reply for location of problem.
Your fix seems to work though but needs adding to the 4.9 release of Enfold- This reply was modified 2 years, 9 months ago by thinkjarvis.
February 20, 2022 at 10:31 pm #1341543February 21, 2022 at 10:46 am #1341603DELETED SEE NEXT POST for problem
- This reply was modified 2 years, 9 months ago by thinkjarvis. Reason: Deleted see next post for correct response
February 21, 2022 at 11:17 am #1341608This is a bug with Enfold and affects all Enfold sites
I have replaced the lines on the example site
Fixed by adding your code. See source I commented out the original so it is still there.The cause is
Enfold/config-woocommerce/config.php on line 2999
and
Enfold/config-woocommerce/config-356.php on line 2493Please can you add your fix to the next release?
- This reply was modified 2 years, 9 months ago by thinkjarvis.
February 21, 2022 at 1:29 pm #1341627February 22, 2022 at 1:27 pm #1341790Hi,
The Dev Team has corrected the two files:
/enfold/config-woocommerce/config.php
/enfold/config-woocommerce/config-356.php
below is a DropBox link to them, you can replace your file with these via FTP.
This has been merged into the master, but unfortunately didn’t make the v4.9 release, so it will be in the next release.Best regards,
MikeFebruary 23, 2022 at 7:12 pm #1342042Thanks Mike,
Much appreciated.
-
AuthorPosts
- The topic ‘Bug: Checkout Error WooCommerce Compatibility 4.8.1’ is closed to new replies.