Open ghost opened 4 years ago
What is value="1"
for? Try to remove it and check it again.
Hey @muuvmuuv thanks for replying. I realised meanwhile, that the issue occurs if I add capabilities after the cookie is set once with less number of capabilities. I deleted the cookie once I added two other capabilities and now it works fine. Maybe something you can check at your end too.
Good point!
btw. you don't need to save the user options twice, there are new events onRejectAll
, onAcceptAll
and onConsent
which you can use for those! :)
Ah I did not know about the these methods. Are they already released? I do not see it in the consent.js supplied so far.
Pushed it just now :) have a look at the update README
The issue you have described should be gone as well, I have checked it and as soon as the user reloads the page again, the error disappears. Could you check that also?
Thanks for the push. Seems like the checkboxes are automatically handled now too! Cool :) The error still persists though. Steps to reproduce are:
The error goes away however if you delete the cookie. It seems like the added capability errors out because it is not in the cookie yet. A solution might be to read the cookie on load, set capabilities respectively and update the cookie with the new parameters (which if the user never changed will be the same old values)?
Following error is encountered on adding a new capability:
Instantiated like this:
With following HTML