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 ?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | interdiff-5-9.txt | 10.44 KB | kevin.dutra |
| #9 | 3276468-9-jquery-selectmenu-update.patch | 21.84 KB | kevin.dutra |
| #5 | 3276468-5-jquery-selectmenu-update.patch | 20.88 KB | mulambo |
Issue fork jquery_ui_selectmenu-3276468
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
flocondetoileComment #3
flocondetoileThis patch replace the file with the new version (jQuery UI Form Reset Mixin 1.13.1).
Comment #4
joncjordan commentedAlso seeing this error:
Uncaught TypeError: a.ui.escapeSelector is not a function
at t...mousedown (selectmenu-min.js?v=1.12.1:4:5602)
It occurs when you click on the selectmenu element.
Similar to the previously-stated issue, this is fixed by updating to jQuery UI Selectmenu 1.13.1. Is there any plan to release an updated version of this module (and other Jquery ui modules) with v1.13.1 of jQuery UI?
Comment #5
mulambo commentedI've updated patch with selectmenu 1.13.1 (not just form mixin).
a.ui.escapeSelectorhas been removed from jQuery in version 3.0 and jQuery UI1.13.1 is using$.escapeSelector(see Dropped $.ui.escapeSelector).There is jQuery UI polyfill patch to use
$.escapeSelectorwith jQuery 1.8.0 - 2.2.4, but since Drupal 9 is using jQuery 3.0+, I've ommited it from patch.EDIT: I've updated core requirements for module, to match core 9.3.10+, since we don't have jQuery UI 1.13 in lower versions. Patch can be extracted from merge request (https://git.drupalcode.org/project/jquery_ui_selectmenu/-/merge_requests...)
Comment #7
radelson commentedThis is working for us and this patch makes sense. I'm marking it as RTBC.
We had both errors following the Drupal core 9.3.10 update.
- Uncaught TypeError: a.ui.escapeSelector is not a function
at t...mousedown
- this.element.form is not a function
These changes fix them both and don't seem to impact the functionalities.
Comment #8
kevin.dutra commentedThings are getting a little dicier with both a patch file and a merge request, especially because they're not in sync. Anywho, moving this back to needs work for a couple of things:
Comment #9
kevin.dutra commentedHere is an updated patch. (Note: At the moment, this patch file is now further along in development than the merge request.)
Comment #10
kevin.dutra commentedComment #11
flocondetoileissue not anymore relevant for 2.x version