CyberD.org
C:\ Home » Blog » Tech » WordPress 5.6 & jQuery Madness

WordPress 5.6 & jQuery Madness

So I ran into some new techknow issues yesterday.

I was planning to just post these two lengthy rambles, but realized on the post screen that I couldn't add the dream tag to one of the posts, and so I started looking for the solution; went down a rabbithole of what seems to be pretty bad planning/development in regards to one particular; supposedly somewhat problematic script library that at this point has been used by WP developers a long long time. But back to my WP-related story...

I'd noticed earlier I couldn't collapse the accordion boxes on the main admin panel, but didn't pay it much mind then. Might be a temporary thing, but after not being able to edit the tag I noticed they didn't work on the edit screen either.

I recalled there'd been a WP update recently, and so I searched for possible issues with it. Others did have the same issue with the post editor, but no solutions.

Surely more people had this problem? It seemed to be directly related to the Classic Editor. Maintained by WP staff. If any plugin should be thoroughly tested and absolutely compatible with a new release it should be that, right? It's a plugin currently relied on by five million active users.

Almost like they're trying to move people over to Gotenburg while they're at it hmm. But that can't be can it?

I kept looking, and as it turns out this is the issue. Few more links.

Basically an old version of jQuery's being deprecated. As WordFence note the timeline's been as follows:

5.5: Remove the jQuery Migrate 1.x script. (August 2020)
5.6: Update to the latest jQuery, jQuery UI, and jQuery Migrate scripts. (December 2020)
5.7: Remove the jQuery Migrate script. (March 2021)

The migration helper plugin came early, to let developers start preparing their plugins and themes for the change, then 5.5 came with a temporary workaround that still ran the old jQuery library where it was needed, and now with 5.6 it's removed entirely. Without notice!

I read through the update notes each time there is a major update, but I did not see anything about this. If it was there it was a minor and not particularly well-highlighted item, yet it's an item that's apparently broken plenty of sites with the latest update. Just search for 'WordPress 5.6 breaks' and you'll get roughly a million results on Google.

Not all relevant probably, but at least the first few pages.

Upon searching the plugin database I found the plugin I should have apparently been aware of two versions ago: this one. I installed it as a temporary fix; hoping to in time sort out any potential issues, but the plugin displays a big notice on every page of the dashboard that can't be removed, a red box in the admin bar, and logs errors automatically no matter how much you try to mute or hide these notifications.

No way I can write these things in peace with this thing doing it's thing, and especially when it throws out errors related to core files, not just the tidbits of code I've personally included. It doesn't feel like they prepared for this at all.

Temporarily reverting to the old jQuery library via the helper plugin did fix my post editing issue though - and accordion meny issue - and maybe issues I wasn't even aware of yet.

I just needed to find a way to hide those notices, but StackOverflow didn't seem to have the ideal fix, nor did this CSS thing work. Editing the theme files worked partially, until my site didn't load at all. Fatal Error.

So I deleted that migrate helper nuisance, and tried this.

Only problem: it didn't work properly without the migrate helper plugin.

If you're looking for alternative plugins don't confuse the jquery migrate helper plugin with the ones that actually remove the migration functionality entirely btw - like this - that'll just make the situation worse if your site isn't already 100% up-to-standard.

This was all turning into a bigger headache than I wanted though, so I decided to simply downgrade the site, and thus I found this. Fantastic. I reverted back a version, and I think I'll stay there a while until at least official WP staff manage to fix the compatibility issues with their own plugins. You might find this useful too btw.

WordPress 5.5.3

Problem solved.

I don't mean to crack down on WP too much here. I know security keeps improving; all code is meant to be actively developed and maintained, so eventually the old jQuery shall have to go, but I do believe they could've handled this a bit more smoothly. Like: let me know somehow. Give me a notice on compatibility issues before things just stop working.

And I really hope they're not planning to drop the Classic Editor. I gave the new a chance and did not like it. Revolutions are subjective after all, and Gutenberg - as it currently is - unfortunately does not at all suit my palette when it comes to good revolution.

Besides, classics are usually classics for a reason.

Comments

Keep track of the discussion via rss? Read about comment etiquette? Or type in something below!
This was pretty damn interesting. And yet, nobody's spoken! Be the first!


The Comment Form

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

Your email is saved only to approve your future comments automatically (assuming you really are a human). ;) It's not visible or shared with anyone. You can read about how we handle your info here.

Question   Razz  Sad   Smile  Redface  Biggrin  Surprised  Eek   Confused   Cool  Mad   Twisted  Rolleyes   Wink  Idea  Neutral

Privacy   Copyright   Sitemap   Statistics   RSS Feed   Valid XHTML   Valid CSS   Standards

© CyberD.org 2021
Keeping the world since 2004.