Problem/Motivation
jQuery UI 1.14.0 was released on August 5, 2024: https://jqueryui.com/changelog/1.14.0/
The module currently provides version 1.13.2:
https://git.drupalcode.org/project/jquery_ui/-/blob/8.x-1.x/assets/vendo...
Proposed resolution
Update to 1.14.1 which is in Drupal core 10.4.x+
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | chrome-console-error-ai-v3.png | 130.89 KB | flyke |
| #6 | jquery_ui-results-1.13.png | 227.64 KB | flyke |
| #6 | jquery_ui-results-1.14.png | 111.89 KB | flyke |
Issue fork jquery_ui-3483054
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
malcomio commentedSee also #3449875: Update to jQuery UI 1.14.0 for core.
Comment #5
rajeshreeputraComment #6
flyke commentedThis MR only changes the reported version in assets/vendor/jquery.ui/ui/version.js.
But all code is still 1.13.
This causes errors when jquery_ui uses old stuff that is no longer present in 1.14.
I get the error:
An error occurred during the execution of the Ajax response: TypeError: i.ui.safeActiveElement is not a functionAccording to the jQuery UI 1.14 changelog and release notes safeActiveElement is removed.
However, if I scan the code of jquery_ui after using this patch for 'safeActiveElement', I get 31 results in 21 files.
I think the correct amount should be zero.
If I scan the code of jquery_ui after using this patch for '1.13.', I get 283 results in 122 files.
I think the correct amount here should also be zero ?
So this patch just pretends to do something by changing the reported version, but the reported version is a lie because none of the code has been updated ?
Comment #7
flyke commentedComment #8
flyke commentedSo ehm... in the end my problem was not solved after updating jquery_ui.
There was apparently also another place that used older jquery.
While I got no errors on my local development environment, on production after deployment I kept getting the error:
An error occurred during the execution of the Ajax response: TypeError: i.ui.safeActiveElement is not a functionAfter a deep dive down the rabbit hole, for some reason the error originated from:
core/assets/vendor/jquery.ui/ui/widgets/menu-min.jsThat file is not in any gitignore file that I created but yet somehow after successful deployments, it does not seem to get updated after deployment. My local menu.min.js file does not contain 'safeActiveElement' but the one on the server after deployment still does.
I checked the file directly in my projects repository, its the correct file in there. I cannot find any reason at all why the file on the server is still old version after deployment. The deployment script also clears caches two times, but still that does not help.
I have now manually overridden the core/assets/vendor/jquery.ui/ui/widgets/menu-min.js on the server with that of my local environment via FileZilla, and now finally I got rid of the error on production and the modal link is working again.
Anyway, I believe I correctly updated the jquery-ui version in the jquery_ui module (ALL files, not just the reported version) in this MR.
And for me, all is working now
Comment #9
flyke commentedComment #10
nelo_drup commented#9 @flyke I have the same error in drupal 10.4.2
Comment #11
recrit commentedComment #12
recrit commentedComment #13
recrit commented@flyke - with still having errors, then you are most likely running into #3420890: Remove duplicate jQuery UI JavaScript and CSS files where some of the core files are still loaded. The patch in 3420890 gives the jquery_ui module full control over all the JS files.
I am working on updating the patch to work with the updates in this issue for 1.14.1 since Drupal 10.4.x includes that version too.
Comment #15
recrit commentedI opened a new MR 20 that is MR 19 with the changes from #3420890: Remove duplicate jQuery UI JavaScript and CSS files . The result is that jquery_ui is updated to 1.14.1 similar to Drupal core after 10.4.x and gives jquery_ui full control over the files with the changes from #3420890: Remove duplicate jQuery UI JavaScript and CSS files .
Attached is a static patch of MR 20 for any composer builds.
Comment #16
recrit commented@flyke and @nelo_drup please test the MR 20 see comment #15 for details.
Comment #17
joseph.olstadTired of waiting? I am.
I've created a drop-in replacement for jquery_ui called jq_ui.
I will credit the above for the work on this fix in a new issue and will tag a release.
https://www.drupal.org/project/jq_ui/issues/3543903
Comment #18
joseph.olstadhttps://www.drupal.org/project/jq_ui/releases/8.x-1.7