klaro-org / klaro-js

Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.

Home Page:https://klaro.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`acceptAll` config setting isn't true by default despite docs

modelesque opened this issue · comments

commented

When I set up Klaro on my site, I didn't set acceptAll: true, in my config because the annotated config shows that it's already true by default. I assumed the settings in the annotated config are the defaults.

However, I noticed that if I clicked the "OK" button on the notice, my services weren't getting loaded and instead the notice would close. It wasn't until I explicitly set acceptAll: true, in my config that it started working.

Is this a bug? Is the config outdated to what's really happening in the code? Not sure, but I figured I'd report it just in case others are having the same issue. It happens in both test mode and not.

Steps to reproduce

  1. Open up your site in an incognito tab and make sure acceptAll is not in your config file.
  2. Open up the "Network" tab in Chrome devtools (or whatever browser you're using). You may need to refresh the page.
  3. When the notice appears, click the "OK" button. The notice will close and none of your services will load.
  4. Close all incognito tabs, repeat the process, but this time make sure acceptAll: true, is in your config. You should see the notice close and your services load.

If the annotated config is just an example and not the defaults, I would suggest changing them to the defaults as it's a bit confusing then as to what is the default settings without having to dig around the code.

Hi @modelesque, I think you misread the annotated configuration, the acceptAll flow is not enabled by default, it just changes the behavior of Klaro when the user clicks on "Accept".

The annotated configuration is not the default configuration of Klaro, it is just an annotated example configuration.

commented

@adewes is it written explicitly somewhere that the annotated config does not show the defaults? Is there documentation somewhere showing this?

I don't think so, but there isn't written anywhere that the annotated config contains default values. Klaro reads a JSON config and if values in that config are undefined it assumes them to be false.

Sorry if that wasn't clear, we'll make this more explicit in the documentation.