Select 2 library is not compatible as stated in https://www.drupal.org/project/select2/issues/3454104#comment-15899448.
We can use the fix suggested here: https://www.drupal.org/project/select2/issues/3454104#comment-15930670
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3509122-jquery4-compatibility-1.patch | 600 bytes | michael.acampora |
Issue fork select2-3509122
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
michael.acampora commentedAttached a patch that applies the same fix as webform does.
Comment #6
shivam_tiwari commentedComment #7
oulalahakabu commentedComment #8
pacproduct commentedPatch in #2 works great, thanks!
Comment #9
cafuego commentedYup, nice.
Comment #10
berdirPer https://www.drupal.org/project/select2/releases/2.0.0, you need to use the development version of select2 which is compatible.
Comment #11
sridhar52 commentedOn Drupal 11, I still see the same issue with Development version of select2 but patch works great, Thanks
Comment #12
sridhar52 commentedignore the above comment, development version works but also need to upgrade the npm-assest
composer require npm-asset/select2:4.1.0-rc.0
Comment #13
torfjUpgrading to npm-asset/select2:4.1.0-rc.0 also fixed it for me. Thank you @sridhar52 !
Comment #14
dydave commentedThanks a lot everyone for the great advice!
For those upgrading the module, updating the library constraint for the RC in project's composer.json fixed the issue for us as well:
Followed by a
composer update (-W)command, or simply:composer require npm-asset/select2:^4.1@RCMake sure the minimum-stability property allows
'RC'versions though.Is there anything we could do to make the update more automated? Perhaps in module's composer.json file?
Any feedback, suggestions, comments or reviews would be greatly appreciated.
Thanks again for the great help on this issue.
Comment #15
nagy.balint commentedThen would simply installing this module work as well?
https://www.drupal.org/project/jquery_deprecated_functions
Comment #16
manav commentedI was facing the same issue with Drupal 11.2.5.
So, I tried the above patch, which is working fine with 2.0 version.
RTBC
Drupal : 11.x
MariaDB : 10.11
PHP: 8.3
Comment #17
aaronbaumanSolved for me with, which many of my other projects rely on as well.
https://www.drupal.org/project/jquery_downgrade
I'm not sure if this MR will be backwards compatible, or whether https://www.drupal.org/project/jquery_deprecated_functions makes more sense, but something to keep in mind.
Comment #18
dafederFor what it's worth there is now a stable 4.1.0 release that appears totally compatible with D10/11