• Resolved dennistd

    (@dennistd)


    Hi

    I have installed and configurated the plugin, but when users accept the cookies by clicking ok, a new blank window opens indstead of it just closing. I use the “close consent bar” option, but still a new blank window opens up.

    • This topic was modified 3 years, 2 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @dennistd,

    Sorry for the inconvenience caused. It is likely a conflict with the site theme.

    Please share us the site URL so that we can check the issue.

    Thread Starter dennistd

    (@dennistd)

    Hi @webtoffee

    Thank you.

    the url is [ link moved to link field where it should be ], and we use Astra theme.
    The plugin is deactivated right now, as I would like it to work before activation.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @dennistd,

    This seems to be caused by the below script on the website,

    <script type="text/javascript">
    //<![CDATA[
    jQuery(document).ready(function($) {
    $('a').each(function() {
    var a = new RegExp('/' + window.location.host + '/');
    if(!a.test(this.href)) {
    $(this).click(function(event) {
    event.preventDefault();
    event.stopPropagation();
    window.open(this.href, '_blank');
    });
    }
    });
    });
    //]]>
    </script>

    If possible, please try again after removing the code.
    OR
    You can also try adding the below snippet to your theme’s functions.php,
    https://gist.github.com/wtmujeebu/a1405d99b8fe8a97c08e2f9d9f4799a7

    Thread Starter dennistd

    (@dennistd)

    Hi @webtoffee

    Thank you for the reply.

    I tried to add the snippet to my theme’s functions.php, but that caused the site to crash, so I had to remove the snippet.

    In which file do I find the above script on my website so I can try and remove it?

    Plugin Author WebToffee

    (@webtoffee)

    Hi @dennistd,

    Thanks for sharing the information. We are sorry for the inconvenience caused.

    Kindly make sure that you have removed the beginning PHP opening tag before adding it to the functions.php file. Check this screenshot for a better understanding.

    The script we suggested to remove may be located in the theme’s footer.php file or it may be added by some other third-party plugins.

    Thread Starter dennistd

    (@dennistd)

    That solved the problem. Thank you very much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘New window on close’ is closed to new replies.