Fixing WordPress wp-auth-check.min.js Uncaught TypeError.
Welcome to KickstartCommerce.com! Let me guess. Your website is not allowing you to update WooCommerce Product Attributes, right?
Or, if not WooCommerce, then maybe you’re encountering all sorts of javascript errors with a site that is severely hobbled in functionality, if not completely dead in the water and not functioning at all.
Whether you have plugins beefing with plugins or themes beefing with plugins, I aim to help you rehabilitate your WordPress website back in order, functioning, and in tip-top shape.
It all started when I received a text message from a long-time customer stating that they were unable to edit WooCommerce product attribute fields via their WordPress admin interface.
Expecting to view the corresponding tab each time a tab was clicked (as displayed above), nothing happened when either the customer or I initiated the click.
Thank goodness for Google Chrome’s Developer Tools, which I opened to assist me in identifying and debugging why WooCommerce Product Attributes we’re not triggering and displaying their respective tab content when clicked.
I quickly discovered the following error in the Console tab of Developer Tools:
wp-auth-check.min.js?ver=5.5.1:2 Uncaught TypeError: Cannot read property 'hasClass' of undefined at HTMLDocument.<anonymous> (wp-auth-check.min.js?ver=5.5.1:2) at HTMLDocument.dispatch (jquery.js?ver=1.12.4-wp:3) at HTMLDocument.r.handle (jquery.js?ver=1.12.4-wp:3) at Object.trigger (jquery.js?ver=1.12.4-wp:3) at HTMLDocument.<anonymous> (jquery.js?ver=1.12.4-wp:3) at Function.each (jquery.js?ver=1.12.4-wp:2) at n.fn.init.each (jquery.js?ver=1.12.4-wp:2) at n.fn.init.trigger (jquery.js?ver=1.12.4-wp:3) at Object.<anonymous> (heartbeat.min.js?ver=5.5.1:2) at i (jquery.js?ver=1.12.4-wp:2)
I searched, scoured the web, and searched various websites — stackoverflow.com, wordpress.org, stackexchange.com, github.com — only to reach a dead end each time.
I started the old deactivate plugin-by-plugin, a tried and true method that often fixes site conflicts, but no dice with it either.
But after searching a few more times using a combination of different words and phrasing as well as searching wp-auth-check.min.js, I narrowed down the customer’s site issue being experienced to that of a jQuery javascript conflict.
Once I narrowed it down to this, I knew exactly what to look for: a jQuery conflict plugin. Upon searching the plugins, I stumbled upon Enable jQuery Migrate Helper, and boy, did it do the trick!
Little did I know, but the WordPress 5.5 update introduced a number of unexpected behaviors in legacy themes or plugins due to the update disabling the once-enabled jquery-migrate tool.
While it’s a solution, the truth is that this plugin is only temporary in hopes of buying time for the authors of your respective theme or plugin(s) to update and test their code.
But for now, Enabling jQuery Migrate Helper solved my problem and got the customer back online.
Let me know if you have any questions or need additional assistance to troubleshoot your issue. Thanks, and that’s all for now!
Lifesaver! Thanks so much!!
Hi Jerome! Glad this fix worked for you. It drove me crazy trying to figure out.
Thank you for sharing Alvin!!!
Stay healthy!
Peter
Hi Peter! Glad to know it helped. Stay well, safe and healthy too.
You saved my job, thank you Alvin!
Jack – Glad to be of assistance, and to know that you’ll live to see another day and tell the story too!
Thanks Alvin! This saved me a lot of debugging time.
Great, Eric! I’m glad this helped fix your issue.
While it can fix things up for now, make sure you (and your readers) realize this is a very temporary fix. (The plugin even says so in its description: “This plugin serves as a temporary solution”).
There’s an underlying issue with some of the jQuery in your theme or one of your plugins, and it will likely break again when the WordPress 5.6 update unless you address the root of the problem.
Correct, Jason! In most cases, it’s likely a plugin or theme issue. In the case of this customer, we used the plugin to resolve the issue and migrated them to a re-built theme. Thanks for your valuable input.