Home › Forums › WoodMart support forum › Critical JavaScript Error: ‘jQuery is not defined’ causing conflicts
Critical JavaScript Error: ‘jQuery is not defined’ causing conflicts
- This topic has 14 replies, 2 voices, and was last updated 1 week, 6 days ago by
Hung Pham.
-
AuthorPosts
-
August 31, 2025 at 2:07 am #683437
mediok.com.uaParticipantHello Woodmart Support Team,
We are experiencing a
ReferenceError: jQuery is not defined
on our site. The browser console indicates that the error occurs when our custom JavaScript block is executed.However, our custom script is written according to WordPress standards, using the recommended
jQuery(document).ready(function($) { ... });
no-conflict wrapper to prevent such issues.The strange thing is, this conflict only happens when the Woodmart theme is active. When we switch to a default WordPress theme like “Twenty Twenty-Four”, the error completely disappears, and our script works perfectly.
This leads us to believe there might be a specific script loading order in Woodmart that is causing this conflict. Could you please provide some guidance or insight on why this might be happening and how to resolve it? We have already tried disabling plugins and clearing all caches.
Thank you for your time and assistance.
September 1, 2025 at 3:28 pm #683670
Hung PhamKeymasterHi mediok.com.ua,
Thanks for reaching to us and appreciate your patience.
To assist you in the best possible manner, I kindly ask that you please provide me temporary wp-admin info (wp-admin URL, username, password) to the Private Content area, this will allow me to thoroughly investigate and address your concerns more efficiently.
Regards,
Hung PDSeptember 2, 2025 at 1:44 am #683763
mediok.com.uaParticipantHello Hung PD,
Thank you for your reply.
I have just generated a temporary login link for you. You can find it in the private content area below.Thank you for your help.
September 3, 2025 at 9:46 am #684072
Hung PhamKeymasterHi mediok.com.ua,
Thanks for details and appreciate your patience.
Please confirm me back if you resolved the issue https://ibb.co/zV3Xw69m
Regards,
Hung PDSeptember 4, 2025 at 4:23 am #684268
mediok.com.uaParticipantHello Hung PD,
Unfortunately, the issue is not resolved. After placing the final tracking scripts, the original error has returned: Uncaught ReferenceError: jQuery is not defined.
The console shows the error occurs in an inline script right after your theme’s helpers.min.js file is loaded. This confirms that the jQuery library is still not being loaded correctly by the theme before other scripts require it.
Could you please investigate this again? The site is still breaking and preventing critical tracking from functioning.
Thank you.
September 4, 2025 at 7:49 am #684280
Hung PhamKeymasterHi mediok.com.ua,
Could you please record a short video of the problem so we can better understand what is wrong?
Thanks for your patience.
Regards,
Hung PDSeptember 4, 2025 at 7:55 pm #684517
mediok.com.uaParticipantHi Hung PD,
Thank you for looking into it. I have discovered new, critical information.
The jQuery is not defined error only appears for logged-out visitors. When I am logged in as an admin, the error is gone, but for any regular user, the site is still broken.
I have recorded a new video to prove this. You can see me logged in with a clean console, and then I log out, and the error immediately returns.
This means the fix is not working correctly for the public-facing site, and my tracking scripts are still failing for all my customers. Please investigate this logged-out vs. logged-in issue.
Regards,
Attachments:
You must be logged in to view attached files.September 5, 2025 at 10:14 am #684621
Hung PhamKeymasterHi mediok.com.ua,
Can you please create for me an admin account then I can follow your video? Also, it is possible to switch to default theme, deactivate plugins for testing?
Regards,
Hung PDSeptember 5, 2025 at 11:45 am #684664
mediok.com.uaParticipantHi Hung PD,
Thank you for your reply. Yes, of course.
I have created a temporary admin login link for you. It will expire in 7 days. You can find the link in the private content area below.
You have my full permission to switch to the default theme and deactivate plugins for testing, just as I did in the video. The site is backed up.
Please let me know once you have found the solution.
Thank you!
Regards,September 7, 2025 at 6:43 pm #684906
Hung PhamKeymasterHi mediok.com.ua,
Thanks for your patience.
I mean that provide me admin account instead. According to the video, an issue occurred when you logged in.
Regards,
Hung PDSeptember 12, 2025 at 12:00 pm #686075
mediok.com.uaParticipantHi Hung PD,
Thank you for the quick reply. I want to clarify a very important point: the JavaScript error occurs only when a user is **LOGGED OUT**. When I am logged in as an admin, the error disappears. The video I sent demonstrates this.
As requested, here are the temporary admin credentials. They will be deleted after the issue is resolved.
You have my permission to deactivate plugins and switch themes for testing.
Thank you for your help.
Regards,September 13, 2025 at 9:04 am #686245
Hung PhamKeymasterHi mediok.com.ua,
Thanks for your patience.
It caused by
WP Rocket
plugin. I kindly recommend you to go through each options to deactivate and re-activate to find which caused the issue.Regards,
Hung PDSeptember 15, 2025 at 11:07 pm #686547
mediok.com.uaParticipantHi Hung PD,
Thank you for investigating.
I understand you suspect WP Rocket, but we have already performed extensive testing that shows the issue is within the Woodmart theme itself.
As shown in the video I sent previously, the
jQuery is not defined
error **completely disappears** when we switch to a default WordPress theme (like Twenty Twenty-Four), **even with the WP Rocket plugin still active**. The error only appears when the Woodmart theme is active.We also tried deactivating the key JavaScript optimization features within WP Rocket (like “Delay JavaScript execution”), and the error still persisted with the Woodmart theme active.
This indicates a fundamental script loading order issue in the theme that is incompatible with standard optimization plugins like WP Rocket, especially for logged-out users.
Could you please re-investigate the theme’s script enqueueing for logged-out users?
Thank you for your continued support.
Regards,September 16, 2025 at 5:36 pm #686692
Hung PhamKeymasterHi mediok.com.ua,
I’ve passed this topic to one of our developers, and I will let you know once get an answers.
Thanks for your patience.
Best Regards,
Hung PDSeptember 17, 2025 at 10:50 am #686767
Hung PhamKeymasterHi Hung PD,
After a more detailed check of your issue, we can confirm that the problem was caused by WP Rocket in combination with your custom JS code. In order for your code to work correctly, it was necessary to add jQuery to the Excluded JavaScript Files list in the WP Rocket settings https://monosnap.com/file/KNszRqtH4W6ThRw0H6X5LehQJK27C3.
We have already applied this change, and now the error on your website is gone. You can verify it.
Regards,
Hung PD -
AuthorPosts
Tagged: bug, conflict, javascript, jquery, js error
- You must be logged in to create new topics. Login / Register