Home > Software engineering >  Type not rendering correctly - Jquery error
Type not rendering correctly - Jquery error

Time:02-10

I received an email with SEO concerns that the font on my site was too small. I checked it out and realized the font size in the navigation and in body greatly reduced in size. The font type also changed from Open Sans and Esteban to Arial.

Site: http://katherinecalvertlcsw.com/

I was told that this looks like an issue with the WP Simple Theme and not WordPress Core. However, on investigating, as per the image linked below, I found that the font value is either not set in or being pulled from the theme options.

https://i.ibb.co/yQ56vYn/Screenshot-from-2022-02-02-23-25-46.png

In Chrome's Dev console, I found this error:

Uncaught TypeError: Cannot read properties of undefined (reading ‘msie’)

at jquery.tools.min.js?ver=1.2.6:20:204

at jquery.tools.min.js?ver=1.2.6:20:2814

I have posted this on a couple of WordPress forums but no one has provided a solution. My WP is 5.9 (up-to-date). I have a very basic understanding of JavaScript, HTML, and CSS, so I need step-by-step instructions on how to fix this. How can I fix this? Thank you in advance!

CodePudding user response:

Your theme is loading a jquery plugin called jQuery tools. This plugin was last updated 10 years ago. It supports upto jQuery version 1.7.1

Where your WordPress is loading the latest jQuery 3.6.0.

Now how you can fix the error ?

You can downgrade your jQuery using this plugin

https://wordpress.org/plugins/version-control-for-jquery/

Or you can try to add the following piece of code at the begining of this file. http://katherinecalvertlcsw.com/wp-content/themes/wp_simple/js/jquery.tools.min.js using ftp. This may work or this may generate more errors.

jQuery.browser = {};
(function () {
    jQuery.browser.msie = false;
    jQuery.browser.version = 0;
    if (navigator.userAgent.match(/MSIE ([0-9] )\./)) {
        jQuery.browser.msie = true;
        jQuery.browser.version = RegExp.$1;
    }
})();

let us know if this helps.

  •  Tags:  
  • Related