Javascript once issue in Drupal 10

Created on 29 August 2023, over 1 year ago
Updated 10 October 2023, about 1 year ago

Problem/Motivation

After upgrade a site to Drupal 10 while using Field Group on a node form, I am getting errors in console
"Uncaught TypeError: $(...).once is not a function"
I am getting this for:
/formatters/fieldset/fieldset.js (issue is at line 33)
/formatters/details/details.js (issue is at line 32)
/formatters/accordion/accordion.js (issue is at line 80)

Steps to reproduce

Create a content type with field groups that use accordions, fieldsets and details in Drupal 10 and go to the node form. Inspect and look in the console.

Proposed resolution

We need to rewrite these functions to be compatible with drupal's once instead of JQuery once. I fixed some of my local usage of once, but not sure how these are using $(document).once(...) should be rewritten.

Remaining tasks

Fix the functions...

User interface changes

None

API changes

none

Data model changes

none

πŸ› Bug report
Status

Closed: works as designed

Version

3.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States maddentim

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

Comments & Activities

Production build 0.71.5 2024