Jquery.once has been removed from Drupal 10 and breaks admin ui

Created on 13 April 2023, about 1 year ago
Updated 17 April 2023, about 1 year ago

Problem/Motivation

With the upgrade to Drupal 10 jquery.once has been removed and core/once is used instead. This breaks webform admin ui.
https://www.drupal.org/node/3158256 β†’

Steps to reproduce

Install Drupal and webforms.
Create a new webform.
Add an element, note the js errors in console. You will see the full field edit screen with no tabs like the field_edit.png.
Fill out the element and save.
Now you will be on the form build screen and be missing the action buttons like the missing_actions.png.

Proposed resolution

Update the js files to use the new core/once() architecture.
https://drupalbook.org/blog/replace-jqueryonce-javascript-once-drupal-10

πŸ› Bug report
Status

Closed: works as designed

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States oheller

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

Comments & Activities

  • Issue created by @oheller
  • πŸ‡ΊπŸ‡ΈUnited States oheller
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    There are no more instances of $().once in the 6.2.x code base.

    My best guess is another contribute module or custom code is triggering this issue.

    Please provide more information.

  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States oheller

    I'm not sure why but it seems like the files were caught in cache (I've got cache disabled locally). Once I removed and resolved that, the proper js files were loaded. Thanks for your help.

Production build 0.69.0 2024