• Resolved doffine

    (@doffine)


    Hello WPFactory team,

    we just noticed a JS/jQuery bug with your plugin on the WooCommerce cart page. (Just) on the cart page we get the following console error:

    Uncaught ReferenceError: jQuery is not defined

    In the code…

    <script>
    jQuery(document).ready(function ($) {
    function getCookie(name) {
    let value = <code>; ${document.cookie}</code>;
    let parts = value.split(<code>; ${name}=</code>);
    
    [...AND SO ON...]

    …it is the word “jQuery” in the beginning that seems to cause the error. Would it be a solution to replace “jQuery” with “$” here?

    As soon as we deactivate your plugin, this error is gone. Do you think you’ll fix this bug with a future version of your plugin?

    Greetings,
    -doffine

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @doffine,

    I am sorry to know that you are having problems.?

    I have escalated this with our development team. They will get back to you as soon as they can.

    Kind regards,
    Moshtafizur

    Plugin Contributor Pablo Pacheco

    (@karzin)

    Hi @doffine ,

    I couldn’t reproduce the issue here.

    jQuery is enqueued by WordPress by default, so that error message is odd.

    Can you please try the following steps?

    1- Temporarily switch your theme to Storefront.
    2- Disable javascript minification from caching/optimization plugin, if you’re using some.

    Thread Starter doffine

    (@doffine)

    Hi @karzin,

    thanks for coming back so quickly. That’s really cool. Because we don’t use any caching/optimization plugins we only changed the theme to Storefront – and the error was gone.

    So your plugin seems to have an incompatibility with the theme Avada that we use.

    Is it an incompatibility that you simply can fix on your side? That would be best we guess.

    Perhaps it might be possible to make some settings changes in Avada, but we wouldn’t know which ones. Beside this, changing settings in the standard Avada setup just to make it work together with your plugin in the cart would look a bit like the tail wagging the dog (no offense ?? ). We think it must be in your own interest that your plugin works with a theme like Avada without any errors straight out of the box.

    Since Avada is one of the most widespread themes out there what would you suggest?

    Greetings,
    -doffine

    Plugin Contributor Pablo Pacheco

    (@karzin)

    Hi @doffine ,

    I couldn’t reproduce the problem here straight out of the box, but I noticed that when I enabled the option: Avada > Performance > Load jQuery In Footer I got the same issue.

    So, can you please just try to disable that option?

    Thread Starter doffine

    (@doffine)

    Hey @karzin,

    we tried your solution in the Avada Performance Settings and that fixed the problem here, too.

    We then noticed that this setting “Load jQuery In Footer” is not the standard setting in a fresh Avada installation and Avada themselves say that one can try to use this setting for performance reasons as long as no plugins conflict with it.

    Perhaps for you it might be worth a thought if you could easily change something in your jQuery code to make it compatible to this Avada setting as most other plugins are. For now, we just disabled this setting and for us all is good now. So I’ll mark this here as resolved.

    Thanks a lot for your prompt and perfect support,
    -doffine

    Plugin Contributor Pablo Pacheco

    (@karzin)

    Anytime @doffine ??

    In that case, please consider leaving a review if you are enjoying the plugin/support. It would be much appreciated ??

    I believe I was able to make the “Load Jquery in footer” option compatible with the plugin now on version 4.2.2 I just released.

    Let me know if it works for you.

    Thread Starter doffine

    (@doffine)

    Hey @karzin,

    we just tried it and yeah, your new version fixes the incompatibility!

    You just got your well deserved 5 stars review :).

    Greetings and have a nice weekend,
    -doffine

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘JS/jQuery Bug on cart page’ is closed to new replies.