Conflict with jQuery Update: jquery.cookie

Created on 25 November 2020, over 3 years ago
Updated 18 June 2023, about 1 year ago

Problem/Motivation

Rather than including the system jquery.cookie library, this module includes 'misc/jquery.cookie.js' directly. This will cause a conflict with jQuery Update on any page that uses the updated jquery.cookie library.

Steps to reproduce

  1. Implement hook_preprocess_page() for your admin theme
  2. Include drupal_add_library('system', 'jquery.cookie'); for the theme, and call jquery.cookie() on the Modules List page.
  3. Visit the Modules List page at /admin/modules with Module Filter enabled.

This causes the custom code using cookies to not work properly if relying on the newer jquery.cookie() code, because Module Filter's inclusion of 'misc/jquery.cookie.js' will overwrite the newer function with the old one used in Core.

Proposed resolution

Include the jquery.cookie library instead, so that jQuery Update's newer version is used.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024