Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
With the new jquery 3 added in Drupal 8.4 I got the following error when I use checkboxradio or selectmenu as they depend on form-reset-mixin:
Uncaught TypeError: this._bindFormResetHandler is not a function
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#9 | 2906737.patch | 1.06 KB | asherry |
#7 | 2906737.patch | 1.04 KB | asherry |
#3 | with_the_new_jquery_3-2906737-3.patch | 1.14 KB | edurenye |
#3 | interdiff-with_the_new_jquery_3-2906737-2-3.txt | 1.08 KB | edurenye |
#2 | with_the_new_jquery_3-2906737-2.patch | 743 bytes | edurenye |
Comments
Comment #2
edurenye CreditAttribution: edurenye at ENDPHASYS Technologies commentedDone.
Comment #3
edurenye CreditAttribution: edurenye at ENDPHASYS Technologies commentedscape-selector is also missing and throws error.
Comment #4
droplet CreditAttribution: droplet commentedCan anyone write a simple script to grab the dependency from AMD? (Either NODEJS / PHP)
https://github.com/jquery/download.jqueryui.com/blob/master/lib/jquery-u...
Comment #5
edurenye CreditAttribution: edurenye at ENDPHASYS Technologies commentedComment #6
flocondetoileSame issue after an upgrade to 8.4, using jquery ui selectmenu. Patch #3 fix the issue.
Comment #7
asherry CreditAttribution: asherry commentedpatch #3 didn't apply for me, and didn't work without the form-reset-mixin-min file which must have been taken out.
assets/vendor/jquery.ui/ui/form-reset-mixin-min.js
I re-patched but my guess is that was taken out for a reason.
Comment #9
asherry CreditAttribution: asherry commentedsorry, for some reason my repo has the git directory in /core.
Comment #10
asherry CreditAttribution: asherry commentedComment #11
paulmckibbenThis fixes the issue for me. I strongly urge this patch be committed and included in the next 8.4.x core release. Without this patch, functionality is broken in one of my clients' sites. Thanks!
Comment #12
GrandmaGlassesRopeManComment #13
xjmI talked about this with @drpal a bit. A few things that came up:
https://jqueryui.com/checkboxradio/
https://jqueryui.com/selectmenu/
So I'm leaning toward maybe committing this since there was a BC break for vendor code and the consequences of adding them back might not be too serious, but OTOH it might be worth discussing whether these don't actually belong in core and there's instead a better workaround for this to provide them for custom code.
Leaving at RTBC for now. Thanks!
Comment #14
droplet CreditAttribution: droplet commentedWe can make a quick decision on #2926155 instead and update them all once. We don't need any frontend review one-by-one since it's AMD module
Comment #15
lauriiiIs the original issue caused by checkboxradio not being usable without escape-selector? Or is this issue about solving the BC break and adding these dependencies because someones specific usage of checkboxradio might require escape-selector? I tried to check the jQuery UI docs and I couldn’t find anything about explicit dependency between these two (http://api.jqueryui.com/checkboxradio/)?
Marking this as NW since it would be great to get an issue summary update on this.
Comment #16
droplet CreditAttribution: droplet commentedRead the source file. It's AMD. For example:
https://github.com/jquery/jquery-ui/blob/master/ui/widgets/selectmenu.js...
That's why I said in #14 to patch them all at once it more efficient.
(we don't know how many widgets still missing dependency but haven't reported in d.org yet)
Comment #17
droplet CreditAttribution: droplet commentedComment #18
lauriii@droplet thanks for pointing that out. I agree that we should fix all of these at once to be effective. Closing this issue as a duplicate to #2926155: Follow-up to #2809427: update from jQuery UI 1.11.4 to 1.12.1 forgot to list some new JS files in *.libraries.yml.