keithxm23
keithxm23

Reputation: 1280

jqGrid throws: Uncaught TypeError: Cannot read property 'a' of undefined

I found several other Uncaught TypeError based questions on SO but not this particular one, so I thought I'll put this up just in case anyone else has had this issue.

My jqGrid works absolutely fine however I keep seeing this error in the console:

Uncaught TypeError: Cannot read property 'a' of undefined jquery.jqGrid.min.js:423

I checked and this corresponds to line 4364 of jquery.jqGrid.src.js

I'm on version jqGrid-4.4.0

I get the error as soon as the grid loads, but before the grid is populated with data.

I'm concerned even though it works because most of my users are on IE6 and IE is very anal even about the silliest of javascript errors at times. Any sort of help on this issue will be greatly appreciated.

PS: A couple of things I thought I'll add after reading responses to similar previously asked questions.

Upvotes: 1

Views: 16247

Answers (1)

Oleg
Oleg

Reputation: 222017

It's very strange!

The line 4364 of jquery.jqGrid.src.js of jQuery 4.4.0 is inside of jqModal module of jqGrid which is mostly not really required. The module should typically not used during loading of the grid. In many cases it could be not used by setting jqModal parameter to false.

I suppose that you have some compatibility problems with other JavaScript plugins which you use.

You can set $.fn.jqm to undefined or null in your code somewhere at the beginning of your code. For example you can do this directly after loading of jquery.jqGrid.src.js or jquery.jqGrid.min.js. As the results the module jqModal will be not used.

Upvotes: 2

Related Questions