Closed (fixed)
Project:
EU Cookie Compliance (GDPR Compliance)
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2021 at 13:16 UTC
Updated:
3 May 2022 at 19:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ivnishIs it actual for 1.18 ?
Comment #3
svenryen commented@Jeslin.Shaji, what's your cookie value? and are the machine names of your categories?
Comment #4
jeslin.shaji commented@svenryen, I have 2 cookie categories with machine names - necessary_cookies and statistics_cookies.
The cookie value of 'cookie-agreed-categories' was %5B%22necessary_cookies%22%2C%22statistics_cookies%22%5D
The new value is ["necessary_cookies","statistics_cookies"].
Attaching screenshots of these.
Comment #5
svenryen commentedThanks, will be taking a look this weekend. The change in formatting was not intentional.
Comment #6
svenryen commentedThis is caused by the move from jQuery Cookie to Js-cookie. We need to encode the string that Js-cookie saves so that it matches the previous one from jQuery Cookie.
I'll make a fix for this tomorrow.
Comment #8
svenryen commentedA fix is in the issue branch.
For those who want a patch file: https://git.drupalcode.org/project/eu-cookie-compliance/-/merge_requests...
Comment #10
svenryen commentedComment #11
onedotover commentedHi there. I'm sorry this isn't in the form of a patch. The escape replacement needs to be changed to a regex so it replaces all instances not just the first one. It needs to be:
Comment #12
svenryen commentedThanks, @onedotover, I'll take a look.
Comment #13
svenryen commentedComment #15
svenryen commentedReviewed and tested. Thanks for contributing! :)
Comment #17
crmn commentedreplace() only replaces the first occurance (when using strings instead of RegEx). so if there are multiple categories stored you will get something like
["essential","stats"%2C"marketing"].i created a patch with replaceAll()Comment #18
flefle commentedProviding also the current release version 8.x-1.19 patch.
Comment #19
svenryen commentedComment #20
svenryen commentedComment #22
svenryen commentedCommitted to the branch, thanks for the contribution!