Hitu Bansal
Hitu Bansal

Reputation: 3137

jQuery Uncaught TypeError: Cannot read property 'msie' of undefined in drupal

I'm facing following error on my Drupal Website:

caught TypeError: Cannot read property 'version' of undefined
jquery.formalize.js?nkmwqx:13 Uncaught TypeError: Cannot read property 'msie' of undefined
caught TypeError: Cannot read property 'version' of undefined
jquery.formalize.js?nkmwqx:13 Uncaught TypeError: Cannot read property 'msie' of undefined
jquery.bgiframe.min.js?v=2.1:11 Uncaught TypeError: Cannot read property 'msie' of undefined

Upvotes: 2

Views: 22396

Answers (3)

Roger Andreeta
Roger Andreeta

Reputation: 21

This issue happens because the "$.browser" property was removed in jQuery 1.9.0. You can fix this problem by adding the code below:

<script>
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;
}
})();
</script>

Upvotes: 2

Uzma Abdul Rasheed
Uzma Abdul Rasheed

Reputation: 60

This issue is related to jquery version. Please take a look at the below links.

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Uncaught TypeError: Cannot read property 'msie' of undefined

Upvotes: 0

Mario Araque
Mario Araque

Reputation: 4572

Probably you have the jQuery update module installed in your Drupal Website.

Try to disable it. Also you can add jQuery migrate.

Upvotes: 1

Related Questions