Update jQuery.once for Drupal 10 support.

Created on 27 March 2023, over 1 year ago
Updated 3 July 2023, over 1 year ago

Problem/Motivation

jQuery.once is till used in month_year.js

Steps to reproduce

Migrate module to drupal 10 and run it.

Proposed resolution

update to use core/once instead of jquery.once

here is the line you need to update.
line 8 of month_year.js, change it to
$(once("monthYearFormField", ".month-year-picker", context)).each ...

🐛 Bug report
Status

Downport

Version

1.0

Component

Code

Created by

🇨🇦Canada bluemoonj

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bluemoonj
  • 🇨🇷Costa Rica maxmendez

    Here a first aproach.

    - Changed core_version_requirement, removed 8 compatibility and updated minimum version of 9
    - Updated library definition to load core.once library.
    - Updated js to use core.once.

    Tested under Drupal 10.1.0

Production build 0.71.5 2024