Problem/Motivation
When writing integrations to the module, it would be useful to be able to use the JS APIs. I am aware that some of these may not be public and so shouldn't be used as there is no real documentation of them. However, at least hasAgreed is documented.
The issue is that when you provide a category to hasAgreed, the mode is not taken into account and so it will return false if you are using any mode except categories mode, where really for an opt-in mode without categories it should return true for all categories.
This makes third-party integrations more involved as they need to be "mode-aware".
Steps to reproduce
Call hasAgreed with a category with opt-in mode and it returns false.
Proposed resolution
Handle the mode in hasAgreedWithCategory.
Remaining tasks
-
User interface changes
-
API changes
-
Data model changes
-
Issue fork eu_cookie_compliance-3254210
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
svenryen commentedThanks for the report, I'll have a look tomorrow.
Comment #3
svenryen commentedI'll get around to this bug within a few weeks. Sorry for the delay.
Comment #4
svenryen commentedComment #6
svenryen commentedUnless I'm looking at the wrong data, there seems to be no changes in the issue branch. Moving this to "Active".
Comment #7
svenryen commentedComment #9
svenryen commented