Hueman depends on jQuery Migrate. Can it be fixed?
-
In order to optimise and speed up my website, I temporarily stopped the jQuery Migrate javascript library (jquery-migrate.min.js) from loading by adding a few lines of code in the theme’s functions.php file.
My site seemingly worked fine afterwards, but I did get an error in the web console. Maybe this is something the theme author, Nicolas @nikeo, can have a look at.
The Console in Safari’s Web Inspector reported:
NOK => browserDetect::addBrowserClassToBody => TypeError: undefined is not an object (evaluating ‘a.browser.chrome’)
The error was located in scripts.min.js:1516:96 in /hueman/assets/front/js/. I don’t know what the numbers (1516:96) after the file name mean (maybe line number?).
The Web Console in Firefox had a similar message:
NOK => browserDetect::addBrowserClassToBody => TypeError: $.browser is undefined
The error was located in scripts.min.js:23:2201.
I’m not an expert at all, but the errors seem to indicate that the code in the scripts.min.js file in the Hueman theme is not 100% compatible with the latest version of JQuery and thus requires that jQuery Migrate is also loaded. Ideally, jQuery Migrate should not be necessary.
I did a bit of googling and found some info about the “$.browser function” being deprecated since 2012/2013. Maybe this is related to the error message…?
(FYI: I’m running the latest version of WP and Hueman, with only one plugin: WP Super Cache. However, I performed the test with the cache plugin deactivated, i.e zero plugins.)
- The topic ‘Hueman depends on jQuery Migrate. Can it be fixed?’ is closed to new replies.