Needs review
Project:
Klaro Cookie & Consent Management
Version:
3.1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2025 at 12:09 UTC
Updated:
10 Apr 2026 at 22:38 UTC
Jump to comment: Most recent
Comments
Comment #3
jan kellermann commentedI added applyConsents() while initialization.
Please review and feedback.
Comment #4
jan kellermann commentedBump. Updated fork, ready to review. Would be great to have this issue reviewed and merged for next release.
Comment #5
jan kellermann commentedComment #6
sascha_meissnerI reviewed this issue with the following result:
I can reproduce the issue and solve it by just setting "Toggled by default" as well.
The codechange in drupal.js is unnecessary and just leads to execute the script twice on load.
I´ll update the MR accordingly.
Comment #7
sascha_meissnerAfter looking again over this together with Jan Kellermann
We found out that it does not work for elements with contextual consent elements, the ressource gets loaded but the contextual element is still shown.
So i´m setting this back to needs work ...!
For scripts without contextual consent, setting "Toggled by default" to true should solve the issue
Comment #8
sascha_meissnerFYI: I just tested the vanilla library and have the same result, the contextual element is shown instead of the resource
Created an upstream issue https://github.com/klaro-org/klaro-js/issues/536
Comment #9
jan kellermann commentedThis is fixed in https://github.com/klaro-org/klaro-js/issues/536
We are considering to update drupal/klaro-js.
Comment #10
jan kellermann commentedSee https://www.drupal.org/project/klaro_js/issues/3508237
Comment #11
nno commentedI don't think this works too. If both "Toggled by default" and "Opt out" are selected it seams that there is no way to opt-out. Services are loaded even if manually disabled under Customize and also if Decline is clicked.
Comment #12
anybodyI ran into a similar case, but I think it's not the same and it's a general server-side blocking that should not happen in that case:
https://www.drupal.org/project/klaro/issues/3568267
Comment #13
anybodyAdditionally to the textual change here, we could also use Drupal Form States API to force the
Toggled by defaultcheckbox to be enabled for better UX. What do you think @jan kellermann?Comment #14
jan kellermann commentedWe released klaro_js 3.1.0 and created a new branch 3.1.x for klaro with the constraint to klaro_js ~3.1.0.
We merged this to klaro 3.1.x
Please test klaro 3.1.x-dev or a current RC for 3.1.x.
Comment #15
jan kellermann commented