Tonight, I was busy at work and suddenly I’ve received a message on WhatsApp. It was Shakul, my client from the UK. His message was enclosed with a screenshot, indicating a problem on his plumbing business website which I have built with wordpress years ago. The website was working well, but the mobile menu was not working, yes! The hamburger menu was not opening on click.
I have checked the issue with my mobile, and then all browsers mobile view. I have started the troubleshooting. Using inspect element, developers tools, It was indicating me the following error message.
Uncaught TypeError: jQuery(…).live is not a function
It was clearly saying something is wrong with jQuery functions. I was not fully aware of why this happening.
I have checked the WordPress theme jQuery files, and replaced them with another version of the theme but could not get this resolve.
Finally, I’ve started to search on Google, and I learn that such kind issues happened when our theme files are outdated. Because WordPress 5.5 stopped using jQuery migrate. And this small change has been causing problems with old plugins and themes.
I have concluded that my client has pointed out this issue exactly after upgrading to WordPress 5.5. That’s why the menu stopped working in the mobile version.
There were better solutions either I upgrade current plugins and themes to versions that do not rely on jQuery migrate or I find some quick tricky plugin that should solve this issue magically.
And I’ve found Enable jQuery Migrate Helper. As of WordPress 5.5 update, a migration tool called jquery migration is not enabled by default. This can cause crashes or unexpected behavior for some themes or add-ons running in your code.
Enable jQuery Migrate Helper plugin works as a temporary solution and can use website migration scripts to give plugin developers and all the more time to update and test their code. Upgrading to WordPress 5.6 will also update the included version of jQuery. This means that old code that previously triggered warnings may fail or even stop altogether.
Some of the functions that stop working run in the background without any obvious problems. This plugin allows you to upgrade to an older version of jQuery after a while, but site admins are encouraged to fix the underlying issue.