• Resolved giannisdallas

    (@giannisdallas)


    Hello, thanks for the nice work

    I can’t make it work. When I activate your plugin the modal isn’t showing AND my CSS & Javascript Toolbox blocks stop working also.

    My webpage is https://www.betterparents.gr and my theme is Enlightenment theme by OneDesigns. Adblock Notify isn’t activated. Notice the green scroll-up arrow.

    I created a clone site https://www.betterparent.gr/site2/ and made some tests. The modal is appearing in the twenty themes BUT the CSS & Javascript Toolbox blocks (the scroll-up arrow) still not working.

    Is there something wrong with my code? Can I alter anything. Thank you very much and I hope the language won’t be a problem

    https://www.ads-software.com/plugins/adblock-notify-by-bweb/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,
    On your site2 I can see that alternative message is working.
    So the an-scripts.min.js is working and well enqueeud (no js error in the console).
    I can also see that you are using W3 Total Cache, and compressing JS files. This plugin is hard to configure and may break your JS.
    Did you try to disable the JS minify? Is the error still there ?
    Cheers

    Thread Starter giannisdallas

    (@giannisdallas)

    Hello,
    thank you very much for the quick response. The error is still there. I disabled minify, then I disabled W3 Total Cache completely, and finaly I disabled CSS and JS toolbox. Nothing worked, Modal has visibility:hidden. Have you got any other ideas?

    Thanks

    Hi there,
    Sorry about that bug.
    It looks like there is a JS error in an-scripts.min.js : “Uncaught TypeError: undefined is not a function”
    The modal still has it visibility set to hidden because the JS failed.
    I’m not sure why this error is triggered but I’m pretty sure this due to a plugin conflict.
    Can you try to disable all your plugin to find the one is causing that bug?
    Thanks

    Thread Starter giannisdallas

    (@giannisdallas)

    ok, I completely removed all the plugins, and did some more testing. The problem occurs in my child theme only, regardless of any other plugin. Is it possible that replacing jquery causes the problem?

    function replace_jquery() {
    if (!is_admin()) {
    // comment out the next two lines to load the local copy of jQuery
    wp_deregister_script(‘jquery’);
    wp_register_script(‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js’, false, ‘1.11.1’);
    wp_enqueue_script(‘jquery’);
    }
    }
    add_action(‘init’, ‘replace_jquery’);

    If you want to check my child function.php and style.css tell me where to send you.

    Hi,
    Did you try to remove this function ?
    The plugin is compatible with the native WordPress jQuery version.

    Thread Starter giannisdallas

    (@giannisdallas)

    Great, that solved the problem!!!

    The problem was the replace_jquery() function. Thank you very much for the help!

    By the way, do you believe replacing jQuery is a good idea overall?

    Glad to hear that!
    Actually, it is a good idea to load it trought a CDN, like you did with googleapis.com. By this way you allow better performance because only 15 HTTP request can be done at the same time to the same HTTP domaine, and CDN are most of the time super fast.
    BUT if you do that, you need to load the same version WordPress includes to prevent this kind of conflicts.
    Finally, keep in mind that if the CDN is down, you’ll not have jQuery loaded and your site may break…

    Thread Starter giannisdallas

    (@giannisdallas)

    Ok, thanks for everything

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Possible compatibility issues’ is closed to new replies.