Error this.element.form is not a function with Drupal Core 9.3.10

Created on 21 April 2022, over 2 years ago
Updated 7 November 2023, about 1 year ago

Problem/Motivation

Drupal Core 9.3.10 has updated jquery ui. See https://www.drupal.org/project/drupal/releases/9.3.10

Especially

Previously, jQuery UI was an emeritus (unsupported) project. However, it recently began receiving support again. Therefore, Drupal core has replaced its fork of jQuery UI with jQuery UI itself, to make it easier to keep it up to date. Additionally, core's jQuery UI package dependencies have been updated to jQuery UI 1.13.1. The unminified source code is kept in core to allow easy audit during future library updates.

And I start to see errors this.element.form is not a function whe trying to instantiate selectmenu().

This error comes from the duplicated form-reset-mixin-min.js file, which have been updated with Drupal Core 9.3.10

Proposed resolution

Not really sure, but I get the new form-reset-mixin-min.js from Core and replace it in this module, and all is working again.

Remaining tasks

Find the "right" fix. Does this module makes sens if Drupal Core embed again jquery UI ?

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇫🇷France flocondetoile Lyon

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024