parseJSON deprecated with jQuery v3 and removed from v4

Created on 29 May 2025, 10 days ago

Problem/Motivation

Line 160 of sidr.js is "options = $.parseJSON(options);". This raises the error that jQuery.parseJSON is not a function.
From jQuery: As of jQuery 3.0, $.parseJSON is deprecated. To parse JSON strings use the native JSON.parse method instead.
Drupal v11 comes with jQuery 4.0.0-beta.2.

Steps to reproduce

Install Drupal v11 and add sidr v5.0.0-rc2.
Create a popup menu. It will not trigger the popup.

Proposed resolution

Change line 160 of sidr.js to "options = JSON.parse(options);".
The menu will now popup.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

5.0

Component

Code

Created by

🇦🇺Australia apiddington

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

Comments & Activities

Production build 0.71.5 2024