• Resolved Anonymous User 13711045

    (@anonymized-13711045)


    I am manually enqueueing js-cookie on my site as I use it for certain things. There is a conflict between it and Popup Maker. The popup never shows and always has display:none set on it. When I dequeue js-cookie the popups show properly. How do I fix this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Bel

    (@belimperial)

    Hi @thekendog

    Thanks for writing in, and we’re glad to assist you.

    Could you please try the solution we have in this article:

    https://docs.wppopupmaker.com/article/544-your-popup-is-not-displaying-on-your-homepage#likely-causes

    Please don’t forget to add the opacity fix.

    Let us know how it goes.

    Thank you!

    Plugin Support mark l chaves

    (@mlchaves)

    Hey @thekendog,

    Are you sure it’s a js-cookie conflict?

    On my site, I enqueue a CDN version of js-cookie and run Popup Maker at the same time. I’ve done this for over a year with no issues. I’m running Popup Maker 1.16.10.

    See if you have other plugins like Woo that load js-cookie. Use something like the Query Monitor plugin to tell you how many times you’ve got js-cookie loaded, what handle it has, and which plugin is loading it.

    As a last resort and if you’re sure it’s a js-cookie conflict, try overriding the existing version of js-cookie with yours by deregistering js-cookie first.

    E.g.,

    
    
    // Let's remove the existing js-cookie library.
    wp_dequeue_script('js-cookie'); // Make sure you use the correct handle.
    wp_deregister_script('js-cookie'); // Make sure you use the correct handle.
    
    // And, we'll replace it with our own ;-)
    wp_register_script(
    		'js-cookie-3-0-1', 
    		'https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js',
    		array(), 
    		'3.0.1', 
    		false
      );
      
    wp_enqueue_script('js-cookie-3-0-1');
    
    
    Thread Starter Anonymous User 13711045

    (@anonymized-13711045)

    @mlchaves it’s definitely js-cookie. There are no other plugins enqueueing it and when I don’t enqueue it, everything works fine. When I enqueue it is when the issue arises. I ended up just using display:block !important; on the pum-active class.

    Bel

    (@belimperial)

    Hi @thekendog

    Thank you for your reply, and we’re glad the CSS fixed the popup.

    If you’d like us to take a closer look, you can use the Temporary Login Without Password plugin (https://www.ads-software.com/plugins/temporary-login-without-password/) to give us access.

    For security, kindly email us the login link, including the line where you enqueue the js-cookie.

    Here’s how to:
    1. Go to https://wppopupmaker.com/support/#submit-a-support-ticket
    2. Click Other Support
    3. Fill in the form
    4. Click SUBMIT

    Here’s a screen capture for your reference: https://share.wppopupmaker.com/geudGzB4

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conflict with JS Cookie’ is closed to new replies.