Make WordPress Core

Opened 22 months ago

Closed 3 months ago

Last modified 3 months ago

#62757 closed enhancement (fixed)

Update jQuery UI library to version 1.14.2

Reported by: pankaj.sakaria Owned by: jorbin
Priority: normal Milestone: 7.1
Component: External Libraries Version:
Severity: normal Keywords: has-patch dev-feedback add-to-field-guide has-dev-note
Cc: Focuses: javascript

Description

An update is available for the jQuery UI library. Core currently bundles 1.14.1.
Changelog: ​https://blog.jqueryui.com/2024/10/jquery-ui-1-14-1-released/

Change History (23)

This ticket was mentioned in ​PR #8065 on ​WordPress/wordpress-develop by ​pankajsakariya23.


22 months ago
#1

  • Keywords has-patch added; needs-patch removed

Updates jQuery UI to the latest version v1.14.1

#2 @pankaj.sakaria
22 months ago

  • Type defect (bug) → enhancement

#3 @pankaj.sakaria
21 months ago

Hi @desrosj I think your input could be helpful on this ticket.

#4 @OllieJones
20 months ago

Infosec penetration tests are starting to flag and fail sites with the old 1.13 jQuery. For example.

​https://stackoverflow.com/questions/79480560/penetration-test-fails-for-wordpress-6-7-2-as-jquery-ui-1-13-3-reached-eol

This particular pentest is government-administered by Bavaria, Germany.

Maybe time to bite the bullet and move forward?

Last edited 20 months ago by OllieJones (previous) (diff)

#5 @johnbillion
17 months ago

  • Version trunk

#6 @mgol
10 months ago

I'd recommend keeping jQuery UI up to date. I see WordPress is still on 1.13.x and the 1.14.x line is already 1.5 years old. There were very few breaking changes in 1.14.0: ​https://blog.jqueryui.com/2024/08/jquery-ui-1-14-0-released/. cc @azaozz

#7 @mgol
10 months ago

Upgrade guide is at ​https://jqueryui.com/upgrade-guide/1.14/. I expect the update to be quite easy.

#8 @jorbin
10 months ago

  • Milestone Awaiting Review → 7.0

​@mukesh27 commented on ​PR #8065:


8 months ago
#9

@pankajsakariya23 Can you please update PR that update the latest version ​https://blog.jqueryui.com/2026/01/jquery-ui-1-14-2-released/?

#10 @mukesh27
8 months ago

  • Keywords needs-testing changes-requested added

#11 @ozgursar
8 months ago

  • Keywords dev-feedback added; needs-testing changes-requested removed

Patch Testing Report

Patch Tested: ​https://github.com/WordPress/wordpress-develop/pull/10893

Environment

  • WordPress: 7.0-alpha-61215-src
  • PHP: 8.2.29
  • Server: nginx/1.29.4
  • Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
  • Browser: Opera
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Code Snippets 3.9.5
    • Test Reports 1.2.1

Steps taken

  1. Add the plugin provided in the Support Content section that has wp_enqueue_script('jquery-ui-core'); and displays its version in the bottom right of the screen.
  2. Visit any page and confirm the enqueued core.js version
  3. ✅ Patch is solving the problem

Expected result

  • After applying the patch, enqueued jQuery UI library switches to version 1.14.2

Screenshots/Screencast with results

Before
https://i.imgur.com/EOERm9t.png

After
https://i.imgur.com/JE09EC3.png

Support Content

  • Testing plugin below is created using Claude.ai tool
/**
 * Plugin Name: jQuery UI Version Checker
 * Description: Display enqueued jQuery UI version in admin and frontend
 */

add_action('wp_enqueue_scripts', 'check_jquery_ui_version', 999);
add_action('admin_enqueue_scripts', 'check_jquery_ui_version', 999);

function check_jquery_ui_version() {
    global $wp_scripts;
    
    // Force enqueue jQuery UI Core to check version
    wp_enqueue_script('jquery-ui-core');
    
    // Display version info
    if (isset($wp_scripts->registered['jquery-ui-core'])) {
        $version = $wp_scripts->registered['jquery-ui-core']->ver;
        
        echo '<div style="position:fixed;bottom:20px;right:20px;background:#f00;color:#fff;padding:10px;z-index:99999;border-radius:5px;">';
        echo '<strong>jQuery UI Version:</strong> ' . esc_html($version);
        echo '</div>';
    }
}

// Also log to console
add_action('wp_footer', 'log_jquery_ui_to_console', 999);
add_action('admin_footer', 'log_jquery_ui_to_console', 999);

function log_jquery_ui_to_console() {
    ?>
    <script>
    if (typeof jQuery !== 'undefined' && typeof jQuery.ui !== 'undefined') {
        console.log('jQuery UI Version:', jQuery.ui.version);
    }
    </script>
    <?php
}

#12 @siliconforks
8 months ago

Note that ​PR #10893 is (pretty obviously) seriously flawed - I wouldn't waste time testing it.

#13 @audrasjb
8 months ago

  • Milestone 7.0 → 7.1

WP 7.0 pre-beta1 Triage:
Unfortunately this enhancement didn't make it before beta 1 code freeze. Thus, let's move it to milestone 7.1.

This ticket was mentioned in ​Slack in #core by adrianduffell. ​View the logs.


3 months ago

#15 @joedolson
3 months ago

  • Summary Update jQuery UI library to version 1.14.1 → Update jQuery UI library to version 1.14.2

#16 @adrianduffell
3 months ago

While the 7.1 beta is fast approaching, this looks worth aiming to include given the older version of jQuery may harm WordPress adoption (as evidenced by the pentest failures).

This ticket was mentioned in ​Slack in #core by wildworks. ​View the logs.


3 months ago

This ticket was mentioned in ​PR #12526 on ​WordPress/wordpress-develop by ​@jorbin.


3 months ago
#18

#19 @jorbin
3 months ago

  • Keywords needs-dev-note add-to-field-guide added
  • Owner set to jorbin
  • Status new → assigned

I think we are going to want to have jQuery set in backwards compatability mode in order to ensure extenders have time to update. see: ​https://jqueryui.com/upgrade-guide/1.14/

This should get communicated in a devnote and mentioned in the field guide.

​@siliconforks commented on ​PR #12526:


3 months ago
#20

Given that jQuery UI is mostly in maintenance mode now, I would think there should not be very many changes here, but it says that the diff is +18,838 lines added, -1,887 lines removed?

Looking at it more closely, the file core.js has +18,481 lines added, -1,429 lines removed, so that appears to be the issue. Looking at the file itself, it looks like it now includes a copy of every other file? That doesn't seem right.

​@jorbin commented on ​PR #12526:


3 months ago
#21

@siliconforks Yep, It's the entire ​dist/jquery-ui.js file as of now. Working on separating it out so that it matches what was previusly shipped

#22 @jorbin
3 months ago

  • Resolution → fixed
  • Status assigned → closed

In 62747:

External Libraries: Update the jQuery UI library to version 1.14.2.

In order to lower the risk with this change, jQuery UI is set to be in back compat mode to keep support for the jQuery UI 1.11 API.

The build for core.js is ​https://jqueryui.com/download/#!version=1.14.2&components=111111111111000000000000000000000000000000000000 with the addition of the deprecated $.ui.plugin from ​https://github.com/jquery/jquery-ui/blob/1.14.2/ui/plugin.js. All other files are based off of files in ​https://github.com/jquery/jquery-ui/tree/1.14.2/ui.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/12526

Props pankaj.sakaria, mgol, mukesh27, ozgursar, siliconforks, joedolson, OllieJones, wildworks, jorbin.
Fixes #62757.

#23 @milana_cap
3 months ago

  • Keywords has-dev-note added; needs-dev-note removed
Note: See TracTickets for help on using tickets.