By spokje on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.1.x
Introduced in version:
10.1.0
Issue links:
Description:
The js-cookie library is unused in core after refactoring. It's therefore deprecated and there is no replacement in core.
Contributed modules relying on this library should use JS Cookie contributed module or seek an alternative solution.
To replace the js-cookie library from core with the one provided by the JS Cookie module, you should follow the following steps:
- Replace
core/js-cookiewithjs_cookie/js-cookiein the MODULE.libraries.yml or THEME.libraries.yml file - Add
js_cookie:js_cookieas dependency in the MODULE.info.yml or THEME.info.yml file - Add
drupal/js_cookieto the composer.json file, if it is used
Impacts:
Module developers
Themers
Comments
also, perhaps.. i was using
also, perhaps.. i was using this in my custom module js with core version:
$.cookie('sia_cert_req_option', option);and had to replace with:
Cookies.set('sia_cert_req_option', option);Peter Lindstrom
LiquidCMS - Content Solution Experts
Good point, if updates are
Good point, if updates are coming from a while back then the JS may not be updated to use JS Cookie.
Changing to JS Cookie was detailed here: https://www.drupal.org/node/3104677