Issue fork select2-3509122

Command icon 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

mike.vindicate created an issue. See original summary.

michael.acampora’s picture

StatusFileSize
new600 bytes

Attached a patch that applies the same fix as webform does.

michel.g made their first commit to this issue’s fork.

shivam_tiwari made their first commit to this issue’s fork.

shivam_tiwari’s picture

Status: Active » Needs review
oulalahakabu’s picture

Status: Needs review » Reviewed & tested by the community
pacproduct’s picture

Patch in #2 works great, thanks!

cafuego’s picture

Yup, nice.

berdir’s picture

Per https://www.drupal.org/project/select2/releases/2.0.0, you need to use the development version of select2 which is compatible.

sridhar52’s picture

On Drupal 11, I still see the same issue with Development version of select2 but patch works great, Thanks

sridhar52’s picture

ignore the above comment, development version works but also need to upgrade the npm-assest
composer require npm-asset/select2:4.1.0-rc.0

torfj’s picture

Upgrading to npm-asset/select2:4.1.0-rc.0 also fixed it for me. Thank you @sridhar52 !

dydave’s picture

Thanks 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:

"npm-asset/select2": "^4.1@RC"

Followed by a composer update (-W) command, or simply:
composer require npm-asset/select2:^4.1@RC

Make 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.

nagy.balint’s picture

Then would simply installing this module work as well?
https://www.drupal.org/project/jquery_deprecated_functions

manav’s picture

I 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

aaronbauman’s picture

Solved 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.