Skip to content

[Bug]: rejectedCategories are being automatically populated when new categories arrive #802

@FedorT22

Description

@FedorT22

Expected Behavior

Despite consent cookies have been accepted or accepted partially, when new categories or services appear, consent manager banner should appear.

My particular example with expected behavior covers the case, when categories are managed by external system. So developer installs the script only once:

Image

Current Behavior

Despite consent cookies have been accepted or accepted partially, when new categories or services appear, consent manager banner does not appear.

Steps to reproduce

  • set up basic Consent.Manager with some categories, services.
  • accept preferences.
  • add new category or service.
  • reload the page.
  • you'll see new categories automatically populated to rejectedCategories, new services in rejectedServices.

Proposed fix or additional info.

Instead of returning anything that is out of acceptedCategories (ref)
manage rejectedCategories in the same way as acceptedCategories by storing them in the cookies.

Could be possible to be done in 2 ways:

  • keep within the same array with status 0 as denied or 1 as accepted
  • keep separate arrays.

Same for services. Ref

Version

3.1.0

On which browser do you see the issue?

Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageyet to be reviewed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions