Simple Hierarchical Select: Chosen not working with Chosen 5.x – JavaScript error

Created on 7 March 2025, 3 months ago

Problem/Motivation

After updating the Chosen module from version 4.x to 5.x using Composer:
the Simple Hierarchical Select: Chosen widget no longer works and throws a JavaScript error:
Uncaught TypeError: context.querySelectorAll is not a function
Reverting back to Chosen 4.x fixes the issue:

Steps to reproduce

1. composer require 'drupal/chosen:^5.0'.
2. composer require 'drupal/shs:^2.0'
3. Turn on modules
4. Create taxonomy field reference and select Simple hierarchical select: Chosen widget.
5. On node creation form the field will not be visible and in console we get error

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇵🇱Poland crafter

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