jQuery Cookie 1.4.1 replace with Js-Cookie 3.0.5 and Shim

Created on 18 August 2023, over 1 year ago

Problem/Motivation

jQuery Cookie 1.4.1 is no longer in development and has vulnerabilities. js-cookie is the replacement used by Drupal 9 with its own shim to translate functions between the two. Lets enable JS-Cookie using this module by providing the shim and admin updates to supply the JS-cookie path when desired.

Steps to reproduce

Update jQuery Cookie path with one from JS-Cookie https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js

You will discover console errors with "$.cookie is not a function, stopping JS from continuing.

Proposed resolution

Add a js-cookie shim to this module that is used when a js.cookie url is used. Also admin updates to help get js-cookie visible.

Remaining tasks

Testing

User interface changes

Admin descriptions that include jQuery Cookie and JS-Cookie URLs

API changes

JS-Cookie version checking and URL's in descriptions
Autoloading of Drupal 9.5.10 js.cookie.shim.js

Data model changes

Feature request
Status

Active

Version

4.1

Component

Code

Created by

🇺🇸United States whthat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024