• Resolved skrombach

    (@skrombach)


    Hey folks,

    great plugin you created! I went through the assistant last night and finally activated the cookie banner but stumbled upon a problem with that I won’t be able to use the plugin.

    The banner shows, but when I click on “Accept all”, nothing happens. When I click on “Only functional”, the settings are accepted and the banner disappears.

    Strange thing I noticed: When clicking on “Accept all” and after that on “Setting”, Marketing category is selected, but statistics is not – still, the banner ist still visible.

    I checked through support forums and found your hint to disable caching or minimizing plugins. I’m using two of them and tried deactivating, but the same problem still exists.

    Do you have any other ideas what to do about it?

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

Viewing 8 replies - 16 through 23 (of 23 total)
  • Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    There is probably a script which depends on this script. This script is probably blocked because of the ad content. The other script then fails because this one is missing. As a result the banner doesn’t dismiss: there’s a jquery error.

    If you put the source of the dependent script in the script center, the issue will probably be resolved. I’ll check your site later tonight to look for this dependent script, and get back to you then.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @skrombach Currently I don’t see the issue with the banner not disappearing, although the script is still there. How can I reproduce the issue on your site?

    Plugin Contributor Leon Wimmenhoeve

    (@leonwimmenhoeve)

    @skrombach Please let us know if there is anything we can do. When looking at your site the banner seems to be dismissed correctly.

    Regards,
    Leon

    Thread Starter skrombach

    (@skrombach)

    Hi @leonwimmenhoeve,

    excuse my late answer. I was packed with other stuff the last week.

    I still have the cookie blocker disabled to prevent the problem from happening as I don’t want my users to be stuck with the cookie banner.

    Kindly let me know should you have the time to check, then I’ll enable the blocker for some time.

    Best,
    Stefan

    Plugin Contributor Leon Wimmenhoeve

    (@leonwimmenhoeve)

    Hi @skrombach,

    Please activate the cookie blocker again and give us a heads up. We’ll have a look as soon as we receive your message. Like @rogierlankhorst mentioned, there is probably a script dependency causing the issue.

    Kind regards,
    Leon

    Thread Starter skrombach

    (@skrombach)

    Hey @leonwimmenhoeve,

    I just reactived the cookie blocker. Let me know when you found the time to check!

    Thank you so much for your great support,
    Stefan

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi @skrombach,

    I see an error on this script resource: js/adsbygoogle.js

    When I check this resource in your html, I notice that it is wrapped in double script tags.

    <script type="text/plain" class="cmplz-script" type='steady-switch' data-when='no-subscription'>
    
        <!--<script async src="***"></script>
        <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-8353229543364248"
         data-ad-slot="9294989998"
         data-ad-format="auto"></ins>
        <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
        </script>-->
    
    </script>

    Because there are script tags within scripts, there is a problem when re-activating the scripts after consent.

    When consent is given, Complianz will run the script that is within the blocked script tags (which are the tags with “text/plain”).

    In this case, the content of the script tags are not javascript, but other script tags. As this is not valid javascript, there’s an error. This is why you see the error “Uncaught SyntaxError: Unexpected token ‘<‘” on this line: <!–<script async src=”***”></script>

    The parser expects javascript, and tries to parse it as such.

    The solution is to remove the double script tags, for example something like this should cause no issues with the cookie blocker:

    <script async src="***"></script>
    <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    <script type="text/plain" class="cmplz-script" type='steady-switch' data-when='no-subscription'>
        <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-8353229543364248"
         data-ad-slot="9294989998"
         data-ad-format="auto"></ins>
    </script>

    Hope this helps!

    Thread Starter skrombach

    (@skrombach)

    Hi @rogierlankhorst,

    thanks for getting into it and for your explanation. As the “outer” script is used for a membership-program I’m using and therefore I’m not sure if everything will work as it’s supposed to be if I alter all the scripts for my advertisements.

    I’ll ask the developers over at Steady if they may have another solution for their script.

    Thank you so far!

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Cookie Banner not disappearing’ is closed to new replies.