Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

acceptAll method in bannerActionsBlock overridden by initialPreferences settings #345

Open
jerturowetz opened this issue Aug 1, 2023 · 5 comments

Comments

@jerturowetz
Copy link

jerturowetz commented Aug 1, 2023

When I set initialPreferences to false for all categories, the bannerActionsBlock method for acceptAll doesn't work as anticipated. I expect the tracking prefs cookie to get set to true for all destinations. Instead, I find the cookie sets all the destinations to false, (which is the the state of the prefs dialogue checkboxes).

Popping open the preferences dialogue using changePreferences pressing save doesn't set the cookie at all unless i toggle the options on and then off again. It's like the cookie being set is looking for a state change but isn't considering the settings applied by initialPreferences.

When I do the opposite, setting all categories in initialPreferences to true and fire the denyAll method, the results are expected. The cookies for all destinations (which were originally true) get set to false and the page refreshes.

initialPreferences and acceptAll Bug with Segment Consent Manager (1 of 2) - Watch Video

initialPreferences and acceptAll Bug with Segment Consent Manager (2 of 2) - Watch Video

@edsonjab
Copy link
Contributor

edsonjab commented Aug 1, 2023

Hi @jerturowetz thank you for your report, we start looking into this

@edsonjab
Copy link
Contributor

edsonjab commented Aug 9, 2023

Hi @jerturowetz I identify that you still use a 5.3.0 version, so, update your library version to last will help you to has a better performance of the app.

@jerturowetz
Copy link
Author

jerturowetz commented Aug 15, 2023

@edsonjab I'm using 5.8.1 and the issue persists. The "Accept All" button does not function, it merely saves whatever settings are set in the radio buttons (as defined by initialPreferences).

Eg: if initialPreferences are set to be:

{
  functional: false,
  marketingAndAnalytics: true,
  advertising: false,
} 

The Accept All button sets all functional destinations to false, all marketingAndAnalytics destinations to true and all advertising destinations to false

@edsonjab
Copy link
Contributor

Yes, you are right, but with my PR #347 that will be fix.

@jerturowetz
Copy link
Author

jerturowetz commented Aug 31, 2023

Isn't the issue be that in the acceptAll method checks if any properties are set instead of overriding? From a user perspective, AcceptAll and DenyAll would apply global settings regardless of which radio button is clicked in the prefs dialogue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants