Categories
Uncategorized

WordPress 5.6 Will Ship With Another Major jQuery Change

WordPress 5.6 will ship with the latest jQuery library next month. This is a major update that all plugin and theme developers should begin testing against. Last week, Marius Jensen announced the change on the Make Core blog.
The following jQuery-related libraries are expected to ship in the update (WordPress Trac ticket):
This change is not surprising. Lead developer Andrew Ozz announced the original three-phase transition to update the jQuery library earlier this June. The end goal is for WordPress to bundle the most up-to-date version and keep it updated going forward. WordPress has fallen behind and relied on an older version for several release cycles. As a result, much of the plugin and theme ecosystem has relied on outdated features.
The three steps of the process are as follows:
If the removing, adding, and once again removing jQuery Migrate sounds confusing, it is because it can be. jQuery Migrate is essentially a helper script that allows developers to “migrate” to newer versions of jQuery. It is a backward-compatibility fix. The version of jQuery Migrate being re-added in WordPress 5.6 corresponds to newer versions of jQuery. It is being added as a temporary fix to give plugin and theme developers time to update their code. The hope is that developers will no longer rely on it by the time WordPress 5.7 ships.
“Following the best practices and the recommendations of the jQuery team, Migrate should be used as a helper tool, not as a permanent backwards compatibility solution,” said Ozz in our discussion a few months ago. “Ideally, WordPress will be able to do this.”
Whether jQuery Migrate is removed in WordPress 5.7 remains to be seen. Right now, it is a tentative goal. Thus far, the process is still on track. Much of this also depends on how smooth the WordPress 5.6 ship sails. The 5.5 release sunk, at least for many users. This is a result that we do not want to repeat.
Navigating all of this is no small feat for end-users. They rely on WordPress, plugin, and theme developers to keep things running smoothly. With a month left before the launch of WordPress 5.6, plugin and theme authors need to start testing to make sure their projects work with the latest version of WordPress.
Expecting some issues with WordPress 5.5, the WordPress development team created the Enable jQuery Migrate Helper plugin to ease the transition for users on WordPress 5.5. In the first week, the plugin had over 10,000 active installations. Today, it has over 200,000 users. This number is not necessarily indicative of plugins and themes with outdated code. Presumably, some percentage of these users no longer need the plugin because their extensions have been updated while they have yet to deactivate it. There is no public data on who is using the plugin and why.
The plugin is still useful right now. It logs deprecation notices and makes them available to users. If the plugin does not log any notices after a week or two, users are encouraged to deactivate the plugin. If they are still seeing notices, they should contact their theme or plugin developers, depending on what is triggering the notices. When users update to WordPress 5.6, they should no longer need the plugin.
We will be six months into this process for the next major release. Developers have had ample time to make adjustments. Let this be a friendly reminder to test plugins and themes during the 5.6 beta cycle.
Plugin and theme authors should test with the SCRIPT_DEBUG constant enabled in their wp-config.php files. More information is available via the Debugging in WordPress documentation.
Jensen has published a guide on updating jQuery in unmaintained themes or plugins. It is primarily geared toward end-users who are comfortable enough going the DIY route. However, developers can find some useful information in the tutorial too.
It continues to impress me how informative wptavern.com is. Thank you 🙂
Report
This is going to be a huge problem for many sites for many years to come (my prediction). There are so many WP sites made by a plugin jockey with commercial plugins and themes, the owner has no idea how to update or maintain. When the site starts breaking, they will get mad at WordPress, and move to Squarespace or something else they won’t have to worry about. Less jobs for developers.
I don’t onow what the long term answer is, maybe WP should never have bundled jQuery, maybe the updater should be able to check for compatibility and require the correct version of jQuery. But this sudden change in WP from never breaking backwards compatibility to breaking every other update is not a good look.
This is why i rarely use commercial plugins on customer sites and keep everyrging in git, disabling auto updates.
Report
I’ve also found that completely disabling updates (including the updater code in the source) is the only way to go. This prevents autoupdates to alpha versions, breaking changes, new editors, etc etc etc.
WordPress is no longer a CMS I control, but one that keeps giving me headaches and tons of support calls from clients wondering what happened to the normal Word interface editor that they’ve been using for decades.
Report
You have one side where people complain about WP being insecure and outdated. Then you have the other side where when WP makes any sort of move, even when they plan it months/years in advance – it falls on deaf ears.
You can’t tell me with a straight face that the internet and internet browsing has remained the same in the past 5 years. There’s so much behind the scenes that has evolved.
If you want a site that doesn’t change for a decade, tell your clients to stick with vanilla HTML circa 2009 that supports Internet Explore 9. The rest of the internet wants to move on. And we’re going to move on without them.
Report
A better move would be to just transition away from jquery. It really is not required these days.
All the complex functionality could be ported to react and all the simple functionality should be vanilla javascript.
Report
There is an initiative to move all core jQuery to vanilla JS if I recall correctly, but that’s a massive undertaking.
Not to mention all the backbone.js code that is scattered around…
Report
The challenge is a lot of legacy code within plugins/themes that rely on jQuery. For example – in my company, much of our animations still run on jQuery itself. There’s nothing wrong with it, and it’s a quick fix to simply call the jQuery library within the theme.
But all the small business WP users who are managing their pizza site off a 2017 WP theme that uses jQuery can’t get that dev support at all. And that’s the internal struggle the WP core team is having.
Now that I think about it – maybe it is something like a basic plugin that calls the jQuery library, so WP Core can migrate out to vanilla JS — while the plugin is what supports the legacy owners.
Report
I think this is good news for the jQuery update. To be honest, I have repeatedly encountered situations when plugins do not work correctly, and the developers simply do not have time to update them in time))
Report
WordPress 5.5 brought down my entire network. Still trying to recover from the issue. Hope same thing will not be repeated in 5.7.
Report
200,000 sites are using the “Enable jQuery Migrate Helper” plugin and I imagine many of those will break on upgrading to WordPress 5.6. I hope someone releases a plugin that allows using jQuery 1.x on WP 5.6.
Report
Hiya,
The numbers are heavily skewed because others recommended the migrate helper plugin as a fix for an unrelated issue between concatenated (merged) scripts and localized scripts.
But the team is looking at adjusting the plugin to account for users who may end up with lost functionality due to abandoned plugins and themes, while also trying to nudge them in the direction of using maintained software.
Report
Thanks for the reply Marius. Great work on Enable jQuery Migrate Helper too!
I wonder how many abandoned WordPress or still have broken sites after the WP 5.5 update.
I certainly understand that jQuery needs to be updated in core, but a solution for older sites to keep running would be nice 🙂
Report
jQuery UI?? It’s stone dead. How can they still be using it? That’s just crazy.
Report
Your email address will not be published. Required fields are marked *









This site uses Akismet to reduce spam. Learn how your comment data is processed.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.


WordPress Tavern is a website about all things WordPress. We cover news and events, write plugin and theme reviews, and talk about key issues within the WordPress ecosystem…read more →
Proudly powered by WordPress.

source

Leave a Reply

Your email address will not be published. Required fields are marked *