Closed (fixed)
Project:
EU Cookie Compliance (GDPR Compliance)
Version:
8.x-1.19
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jan 2022 at 16:12 UTC
Updated:
24 Apr 2022 at 13:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
elberHello could you to say what file is the issue? Thank you
Comment #3
svenryen commentedHi Lucky, and thanks for your report.
This could be a bug. If you uncheck the "Put the "Withdraw consent" button on the cookie information banner." checkbox, there's a withdraw button, but the rest of the banner is hidden.
I won't be able to look into this till the weekend.
Patches are also welcome.
Comment #4
lucky723 commentedHi,
@elber, no idea sorry
@svenryen, if I uncheck "Put the "Withdraw consent" button on the cookie information banner.", the message in the banner says the cookies have been accepted, and the withdraw button is there (the tab also disappears). If I click the withdraw button, then the banner gives again the choice to select/unselect categories.
Btw I forgot to say I use the option "Opt-in with categories. Let visitors choose which cookie categories they want to opt-in for (GDPR compliant)."
Am I right if I say, considering the options I chose, that both accept and withdraw buttons should appear side to side on the right of the banner, and the categories on the left ?
Thanks.
Comment #5
svenryen commentedYes, that's the correct assumption. I think we had the button there when the feature was originally set up, but somewhere along the line the bug snuck in.
Comment #6
ambient.impact@svenryen I think I've spotted the problem: the withdraw button is given the
visually-hiddenclass but the JavaScript tries to show it using jQuery.show()method, which I'm pretty sure doesn't know about that class so that's why it's not showing up.Comment #8
ambient.impactThrew together a quick fix that removes the
visually-hiddenclass rather than calling.show().Note that this doesn't fix the following, as it might be unrelated:
Comment #9
lucky723 commentedHello,
@Ambient.Impact, I've applied your proposal merge request !49
First in my version of js/eu_cookie_compliance.js (8.x-1.19), in the lines 160 and 464,
I don't have :
if (_euccCurrentStatus === cookieValueAgreedShowThankYou || _euccCurrentStatus === cookieValueAgreed) {
but :
if (_euccCurrentStatus === 1 || _euccCurrentStatus === 2) {
I've changed lines 161 and 465 as you suggest, indeed the withdraw button appears if 1 type of optional cookies at least is checked.
Since I want it to be always there, I've removed the condition above.
At the end I have :
158 if (drupalSettings.eu_cookie_compliance.withdraw_enabled) {
159 Drupal.eu_cookie_compliance.attachWithdrawEvents();
160 // if (_euccCurrentStatus === 1 || _euccCurrentStatus === 2) {
161 $('.eu-cookie-withdraw-button').removeClass('visually-hidden');
162 //}
163 }
164 }
462 if (drupalSettings.eu_cookie_compliance.withdraw_enabled && drupalSettings.eu_cookie_compliance.withdraw_button_on_info_popup) {
463 Drupal.eu_cookie_compliance.attachWithdrawEvents();
464 // if (_euccCurrentStatus === 1 || _euccCurrentStatus === 2) {
465 $('.eu-cookie-withdraw-button').removeClass('visually-hidden');
466 // }
467 }
And it works.
Is it a good method ?
Thanks.
Comment #10
ambient.impact@Lucky723 Regarding your two questions:
Comment #11
pasperbla commentedI have created a patch that I share with everyone and that solves the problem.
Comment #12
ambient.impact@pasperbla While I appreciate your contribution, there's already a merge request open for exactly those changes and a patch available from that merge request:
Comment #13
swarad07I can confirm that for 1.19 we do need both patches, the order should be,
1. Patch from #3254209: Changing cookie policy version will mean the banner can never be dismissed
2. Patch from this issue's MR -> https://git.drupalcode.org/project/eu-cookie-compliance/-/merge_requests/49
#2 only works if 1 is applied first.
Comment #18
Michael Zetterberg fd. Lopez commentedPatch in https://git.drupalcode.org/project/eu-cookie-compliance/-/merge_requests/49 works for me
Comment #19
svenryen commentedComment #21
svenryen commentedMerged! Thanks for the contribution!