Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug v2]: Can't update dynamic scripts in opt-out mode when no consent is made. #556

Closed
HannaHabr opened this issue Aug 3, 2023 · 4 comments · Fixed by #557
Closed

[Bug v2]: Can't update dynamic scripts in opt-out mode when no consent is made. #556

HannaHabr opened this issue Aug 3, 2023 · 4 comments · Fixed by #557
Labels
bug:confirmed bug Something isn't working
Milestone

Comments

@HannaHabr
Copy link

HannaHabr commented Aug 3, 2023

Description

Hi! Is it possible to pass default_enabled_categories to _manageExistingScripts in updateScripts call? I use opt-out mode. I need this behavior to update dynamic scripts when no consent is made. In this case updateScripts just do nothing, because cookie is not set and default_enabled_categories are not provided, but they exist in config.

image

Proposed solution

There are two ways to do this:
1.

_cookieconsent.updateScripts = function(must_enable_categories?: string[]){
            _manageExistingScripts(must_enable_categories);
 }
_cookieconsent.updateScripts = function(){
            _manageExistingScripts(default_enabled_categories); //pick from config if opt-out mode
 }

Additional details

Can this be made based on 2.9.1 version? I use it right now.

@HannaHabr HannaHabr added the enhancement New feature or request label Aug 3, 2023
@github-actions github-actions bot added the triage yet to be reviewed label Aug 3, 2023
@HannaHabr HannaHabr changed the title Can't update dynamic scripts in opt-out mode when not consent is made. Can't update dynamic scripts in opt-out mode when no consent is made. Aug 3, 2023
@orestbida orestbida added bug Something isn't working bug:confirmed and removed enhancement New feature or request triage yet to be reviewed labels Aug 3, 2023
@orestbida
Copy link
Owner

This is a bug actually, will be fixed in the upcoming release!

@orestbida orestbida changed the title Can't update dynamic scripts in opt-out mode when no consent is made. [Bug v2]: Can't update dynamic scripts in opt-out mode when no consent is made. Aug 3, 2023
@orestbida orestbida added this to the v2.9.2 milestone Aug 3, 2023
@HannaHabr
Copy link
Author

@orestbida thanks! Do you have a date of the release?

@orestbida
Copy link
Owner

Most likely by the end of the week.

@orestbida
Copy link
Owner

@HannaHabr v2.9.2 is out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:confirmed bug Something isn't working
Projects
None yet
2 participants