Closed (fixed)
Project:
EU Cookie Compliance (GDPR Compliance)
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2019 at 10:18 UTC
Updated:
14 Nov 2025 at 03:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Snehal Brahmbhatt commented@arthur_lorenz, Here's the patch as per the requested changes mentioned above, I removed the jquery dependency from libraries.yml
Comment #4
arthur_lorenz commented@snehal.addweb thx, but this is actually not what I want to have. I want the js file to be modified, so no jQuery function is used anymore.
Comment #5
arthur_lorenz commentedComment #6
svenryen commentedComment #7
svenryen commentedNo, we definitely can't use that patch :)
It's a monumental task though, to remove reliance of jquery, and it would have to be done for both d7 and d8.
Comment #8
arthur_lorenz commentedHad some spare time and I created this first attempt of removing jQuery dependency from the d8 module. This will most likely need some testing and refinement, but it seems to work for me.
Comment #9
arthur_lorenz commentedComment #10
arthur_lorenz commentedGot the chance to test it on IE11, had to fix some issues to get it to run, but now it seems to run flawless.
Comment #11
arthur_lorenz commentedComment #12
norman.lolComment #13
norman.lolComment #14
svenryen commentedWe need a patch for Drupal 7 before we can add this to the dev branch.
Comment #15
norman.lolWhy is that? Because of feature equality?
Comment #16
svenryen commentedYes. It will be really hard to maintain a stable module and offer equal support to 7 and 8 if the scripts are vastly different.
Comment #17
svenryen commentedI'm going to change my mind on that, and start adding features to 8.x without requiring a backport to 7.x.
Luckily the patch still applies, I'll do some testing and try to commit this later.
Comment #18
svenryen commentedI gave the code a go, and it fails with the cookie categories feature. There's an error thrown when the module tries to read the json saved in the
[cookie-name]-categoriescookie.I didn't test it further. If you could look into that it would be great. I will return to this, but there's a lot of open issues at the moment.
Comment #19
arthur_lorenz commentedAwesome.
Sry seems like i tested it only properly with default configuration. Fixed issues with categories, this should work now. Also found some bugs of withdraw-popup animation and fixed it. I hope this is fine now.
Comment #20
svenryen commentedThanks. I'll have a look later.
Comment #21
anybodyWhatever we'll do here, this is definitely a candidate for a separate branch! The patch is quite large and will require very many rerolls over time, whenever other issues are fixed.
That costs a lot of volunteers time nobody here likes to invest, I guess.
So if this is an option, it should become a separate 2.x branch which then requires all other issues to be also fixed there, but keep things separate and clean.
I'd suggest to first have a sprint in 8.x-1.x to create a new stable release with all important RTBC'd patches, wait for some weeks for regression issues and then create a separate branch and proceed there as quickly as possible to prevent duplicate issues.
BTW I don't think it will make sense to backport that to D7 because of EOL!
Comment #22
arthur_lorenz commented2.x branch is a good idea, also we could introduce proper es6 style. That would make my patch irrelevant, but the result would be much nicer.
Comment #23
thomas.frobieter+1 for that ==> #3130662: Roadmap to 2.0.x release
Comment #24
arthur_lorenz commentedAwesome, I'll set this on "needs work" then and update the description
Comment #25
christian.wiedemann commentedThe setCookie did not set the options to the cookie. I fixed that and rerol it for the latest dev.
Comment #26
christian.wiedemann commentedComment #27
purushotam.rai commentedPatch #25 does not work for me, probably because I'm using 8.x-1.9
But apart from that, patch 25 does not cover all the changes of #19, check line 314 of the patch. Probably it was missed. PAtch 25 does good job of adding cookie options properly.
I also noticed some important bugs of Patch 19, which creates functional problems, specially the cookie removal process.
Adding interdiff wrt Patch 19 as well, for better visibility.
Comment #28
norman.lol@purushotam.rai – So is your patch now against latest dev or against 1.9?
Comment #29
purushotam.rai commentedIt's 1.9 as of now.
Comment #30
norman.lolThank you for clarification. Do you see any chance to create the patch from the latest dev to let the tests run and let others review it properly and enable the maintainers to apply and push it?
Comment #31
svenryen commentedThanks all for the monumental work being done in this issue.
Just heads up - we have a lot of patches going into -dev these days, so you may need to do multiple re-rolls to catch up.
I see a lot of setting the status to "Needs review", though it would be useful if somebody has time to test all features (or even better, start writing tests) with this patch applied so that we know we're not breaking any part of the module when we remove jQuery.
Comment #32
svenryen commentedThe patch needs a re-roll (though it's probably a good idea to hold off for now).
Comment #33
svenryen commentedI'd like to ask a question about the Javascript in this module, as I see there keeps being some movement in this issue.
If you had the choice, would you rather help restructure the javascript so that it's more object oriented and easier to maintain in the long run, or do you prefer to move the script from #27 to 2.0.x and then maybe stripping away some of the functionality that we don't want to bring forward to 2.0.x?
Comment #34
anybodyHi svenryen,
from my perspective 2.x should definitely be a complete rewrite and we should not copy any code, just learn from 1.x what worked well and what didn't. For the JS part that means for me, that we should focus on API thinking and split into general logic (API / model) which could even be controlled from outside, for example by third party modules (a concrete example would be to have a module adding a layer to (de)select categories or add options to the privacy policy to opt in / out, etc.).
In the eu_cookie_compliance logic these general functionalities are also simply called ("business logic"). There are several cases in the issue que where the problem was, that the current code was too complex and had side-effects to allow calls from extending modules.
This would help a lot to improve the readability & testability of the code and allow easier integration and modification.
My two cent ;)
Comment #35
svenryen commentedComment #36
sittard commentedI'd be happy to help test this and get this much needed feature into 2.x. But unfortunately the current patch does not apply to 1.14 or dev. Any chance this patch could be updated so we could review it.
Thanks.
Comment #37
svenryen commentedI think it's fair to say we will need to rewrite the javascript in version 2 (mainly because it's grown out of hand with all the patches we've accumulated over nearly a decade), so making this patch apply to 1.x may not be the best way to allocate resources (although you're welcome to spend time on that if you wish as it could be a valuable patch for those on 1.x that would like to remove jquery).
Comment #38
svenryen commentedI'm closing this issue as the script will be rewritten in 2.x and we won't need this patch.
Though thanks a lot for the effort that went into this issue.
Comment #39
loominade commentedfor anyone who might need it, here's a patch for 1.9
Comment #40
svenryen commentedComment #41
atowl commentedHi All,
going to close this as i've done a pile of work in https://www.drupal.org/project/eu_cookie_compliance/issues/3552718 to remove the current jquery.
it's still in beta testing, but i think it covers most aspect of what the module needs to do.