Closed mgrundkoetter closed 3 years ago
Unblocking is done by Klaro Consent Manager. Are there any JS-Errors in the console?
Could you run the following command in the inspector and check if the value changes when switching between "on" and "off" for the media group in the consent modal.
window.klaro.getManager().getConsent("media")
You can easily open the modal with
window.klaro.show()
The result, if I accepted all the groups is:
window.klaro.getManager().getConsent("media")
true
This is also correct in the UI dialogue. There are no errors in the JS console. The Element Browser shows this html if I did not accept:
<script data-src="https://xyz.local/_Resources/Static/Packages/WebExcess.OpenStreetMap/Assets/Main.js" data-name="media" type="text/plain" id="" async="" style=""></script>
and after I accepted it looks like this:
<script data-src="https://xyz.local/_Resources/Static/Packages/WebExcess.OpenStreetMap/Assets/Main.js" data-name="media" type="undefined" id="" async="" src="https://xyz.local/_Resources/Static/Packages/WebExcess.OpenStreetMap/Assets/Main.js" style=""></script>
The Main.js is never loaded, says the network tab, no matter what I chose in the klaro dialogue.
I was able to reproduce this bug. Klaro seems to look for a corresponding data attribute to "repair" the tags.
<script data-src="index.js" data-type="application/javascript" type="text/plain"></script>
Can be repaired as Klaro can recover the original type.
<script data-src="index.js" type="text/plain"></script>
This fails and will lead to this markup
<script data-src="index.js" type="undefined"></script>
Because it cannot recover the original type.
This needs to be fixed in CookiePunch. It seems that Klaro adds the type="text/plain" and then fails, because there is nothing to recover the original value from.
We use the NEOS package "WebExcess.OpenStreetMap" on the website (just an example). Integration as in their readme. Now we added the CookiePunch (also as in readme) and use this config:
The cookie banner is shown as expected, everything looks fine. All the "default" scripts also appear as normal in the html source code. The problem is, that even after activating the "media" group (with or without reloading the page), the Main.js file still remains blocked:
Am I missing something in the configuration? I can't get the "unblock" step to work :-( What am I doing wrong?