Problem/Motivation

core/jquery.once is deprecated and core/once is recommended as of Drupal 9.2. jquery.once is removed in Drupal 10.

https://www.drupal.org/node/3158256

Comments

joshuasosa created an issue. See original summary.

atul_ghate’s picture

Assigned: Unassigned » atul_ghate

Hello,
I will work on this issue.

atul_ghate’s picture

StatusFileSize
new332 bytes

I have replaced core/jquery.once with core/once and provided a patch for your review

atul_ghate’s picture

Assigned: atul_ghate » Unassigned
Status: Active » Needs review
j_s’s picture

Thanks for the update! From my testing on Drupal 10, it'll need more rework in the JS file. Enabling Chosen on admin pages and then testing it on admin views, it didn't work with an error about this.getElements(context).once not being a function.

Additionally, it may be good to set the Drupal version requirement for the module to ^9.2 | 10 since it'll probably break anything below that.

j_s’s picture

StatusFileSize
new1.57 KB

Attached is a patch, tested on Drupal 9 and 10.

  • nagy.balint committed 7e4ba19 on 3.0.x
    Issue #3326698 by joshuasosa, atul ghate: Replace deprecated jquery.once...
nagy.balint’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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