Uncaught TypeError: $(...).once is not a function

Created on 13 April 2024, 6 months ago
Updated 27 April 2024, 5 months ago

Problem/Motivation

The jquery once function needs to be replaced by the new once library. I've seen this get missed by a lot of automated compatibility checks when the dependency was never actually specified in the libraries file.

Steps to reproduce

  1. Drupal 10 install
  2. Add tally filed with any configuration
  3. Error shows because jquery once has been removed

Proposed resolution

Update the JS to use the once library now in core, and add the requirement explicitly to libraries.yml.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States asherry

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

Comments & Activities

Production build 0.71.5 2024