- Issue created by @codebymikey
- Merge request !161Issue #3527482 by codebymikey: Category scripts aren't removed → (Closed) created by codebymikey
- 🇳🇿New Zealand atowl
Hi @codebymikey,
Can't delete that bit of code, thats responsible for weeding out any scripts that won't be loaded on the page.
I'm working on a solution at the js script end presently to fix it.
Can't delete that bit of code, thats responsible for weeding out any scripts that won't be loaded on the page.
Is that really the case? From my tests and inspecting the code, the
$disabled_javascripts
entries are weeded out here, in particular:unset($javascript[$script]);
, which is what thearray_filter()
was doing anyway.I'm working on a solution at the js script end presently to fix it.
That's good to know, hopefully it's something similar to Klaro, where the script tags are replaced with a placeholder one that gets evaluated as a script when the user accepts cookies:
<script type="text/plain" data-type="text/javascript" data-eucc-category="analytics" data-eucc-attach-behavior="customModule" data-name="custom_module" data-src="/modules/custom/custom_module/js/custom.js"> </script>
- 🇳🇿New Zealand atowl
Hi @codebymikey,
I've pushed a change to a new issue fork here, could i get you to test it and let me know how it goes?
As much as i would like to change to what you have suggested, i can't do it just yet. I'd like to just get the module a bit more cleaned up first.
BUT! lets create a feature request, and get it done as i do think that's a good idea! - First commit to issue fork.
- 🇬🇧United Kingdom progga
Hello,
This change seems to work for us. If you can please take a look.Thanks.
- Merge request !165Fix category scripts not being executed after cookies accepted → (Merged) created by atowl
- 🇳🇿New Zealand atowl
Hi - going to close this as being fixed, a lot more of the discussion was made in #3528439.
If it wasn't fixed, feel free to reopen. It seems like the latest commit doesn't work for my use case. I've updated the issue summary with steps to replicate the issue.
Unfortunately don't think I'll be able to test and work on this further as I'll be working on migrating to Klaro next, I just thought I'd document this in here because the next version is released.