Problem/Motivation
When trying to disable a JavaScript by category EU Cookie Compliance messes with the URL.
Steps to reproduce
Consent method: Opt-in with categories. Let visitors choose which cookie categories they want to opt-in for (GDPR compliant).
Create a Cookie category:
disqus|Usability cookies
Disable JavaScripts:
disqus:sites/all/modules/disqus/disqus.js
When not accepting the "Usability cookies" category EU Cookie Compliance doesn't find resource: /disqus%3Asites/all/modules/disqus/disqus.js
Proposed resolution
Category name shouldn't be appended to disabled JavaScript URL. The resource should be correctly sites/all/modules/disqus/disqus.js (without the category tag included)
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
svenryen commented@slampy would you be able to test the current -dev build? It should be stable enough, we're already using it on a few sites.
I think we have solved this bug already.
Let me know how it works. Thanks!
Comment #3
svenryen commentedComment #4
svenryen commented@slampy, which browser are you using? And which version of php?
I believe this was fixed in #3115531: Disabled JS does not load after consent., but looking at that issue now, it seems we fixed the opposite condition; strings not being URL encoded.
It seems that in your case, the setting string was url encoded.
Comment #5
svenryen commentedI'm attempting a stab in the dark here, can you apply this patch and see if it fixes your issue?
Comment #6
svenryen commentedComment #7
neslee canil pintoComment #8
slampy commentedI have upgraded to 7.x-1.x-dev. The error has gone but it looks like the js files are still loaded (even after refresh).
What is the correct format to block a JS?
1, disqus:sites/all/modules/disqus/disqus.js
2, disqus:public://sites/all/modules/disqus/disqus.js
3, disqus:modules/disqus/disqus.js
4, disqus:public://sites/all/modules/disqus/disqus.js
How can I check if the JS is blocked? It still shows up in the source code under Chrome DevTools.
Comment #9
svenryen commentedUnfortunately, with the way disqus.js is added in their module, you can't use the feature in EU Cookie Compliance to prevent that script from loading.
Comment #10
svenryen commentedNot sure if there are any test steps for this one, you can probably just do a review by reading the code and then just checking that we don't break any related functionality by applying this patch.
Comment #11
neslee canil pintoPatch needs a reroll
Comment #12
svenryen commentedComment #14
neslee canil pintoCommitted to dev branch. Thank you.