Error Starting Micro Themer (SOLVED)

Author Posts

1sourceweb

I received the following error when I first attempted to start Microthemer.
This error was remedied by going into Microthemer Preferences/General and ticking the radio button for “Add “first” and “last” classes to menu items”

Uncaught TypeError: Cannot read property ‘hasClass’ of undefined (line 1)
Microthemer discovered a JavaScript error on your site:

Error: Uncaught TypeError: Cannot read property ‘hasClass’ of undefined
URL: /wp-includes/js/wp-auth-check.min.js?ver=5.2.2 (line 1)
Source: Microthemer interface

What does thins mean?


vikasg1970

Thanks for information. I was also getting this error. Now with the help of your information, I am able to resolve the issue.
But, is it a Bug and need rectification?


Sebastian

It’s an old setting, from before Microthemer used :first-child and :last-child to target first and last menu items. It’s off by default nowadays. But I’ve kept it for legacy users.

Unfortunately some themes haven’t updated in accordance with changes WordPress has made to the nav_menu_css_class action hook. And so they produce an error when this setting is enabled.

It’s been years since the setting was on by default, so it could be time to retire it…

Cheers,
Sebastian

You must login or register to reply to this topic.