Problem/Motivation

The jquery.once library was apparently removed in Drupal 10.
I do now have the problem, that improved_multi_select doesn't work as a consequence.

I get the error: $(...).once is not a function

Steps to reproduce

Install Drupal 10.0.3
Install improved_multi_select latest dev
Visit any page with IMS enabled on the form element
You should see a JavaScript error and have a non-working IMS

Proposed resolution

I attached a patch that replaces jQuery.once with the new core/jquery.once library.

According https://www.drupal.org/node/3158256 this library part of 9.2 core

Comments

scotwith1t created an issue. See original summary.

scotwith1t’s picture

Issue summary: View changes
scotwith1t’s picture

Issue summary: View changes
holo96’s picture

Status: Active » Needs review
StatusFileSize
new1.53 KB

Initial patch is not correct, library is not attached, also once is not param.

Attaching new patch.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Looks great and will need new release

  • andypost committed 882e4fdc on 8.x-1.x
    Issue #3343529 by andypost: drupal/once available since 9.2 core
    
andypost’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Commited and creating new release

andypost’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.