Reviewed & tested by the community
Project:
Select 2
Version:
2.0.0
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2025 at 12:42 UTC
Updated:
17 Mar 2026 at 15:09 UTC
Jump to comment: Most recent, Most recent file
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.