Problem/Motivation

After replacing the js-cookie dependency that was removed from Drupal Core, with the js-cookie CDN library, dismissing Notification Message no longer works.

It appears that the js-cookie library is also deprecated and does not function correctly when instantiated via the Notification Message module.

Steps to reproduce

Install, configure, and set up Notification Messages as normal, including the dismissal settings for any Notification Message created.

Proposed resolution

Re-write the `notification-message.dismiss.js` file to simply use out-of-the-box JavaScript cookie functionality, creating custom functions to parse, read, and set cookies accordingly.

API changes

Remove the dependency on js-cookie entirely.

Command icon 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

philip_stier created an issue. See original summary.

  • droath committed bc1ae936 on 2.0.x
    feat: #3525019 New js-cookie JSDelivr dependency does not work
    
    By:...
droath’s picture

Thanks, Phil, for this patch. I now introduced ESLinting in this module, so I had to make some refinements to your MR, but it's been included in the 2.x release.

droath’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.