Uncaught TypeError

Workarounds and usability notes.

Uncaught TypeError

Postby Robert Stevenson » Mon Feb 16, 2015 6:06 pm

In attempting to rework an older book I have a successful export but on running the randomized quiz students get the following error on some questions:

Uncaught TypeError:
Cannot read property "openstate" of undefined (line number 588). Where in the world would i start looking for whatever is causing this one?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Uncaught TypeError

Postby Clifton » Mon Feb 16, 2015 6:09 pm

This can sometimes happen when updating older books that were created in a previous version of ToolBook. You need to know which page the error occurs on and then rebuild the question object for that page. Generally, that should correct the problem. In a worse case scenario you may have rebuild the entire question page.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Uncaught TypeError

Postby Robert Stevenson » Mon Feb 16, 2015 10:16 pm

Seems to be a bunch of questions. Dang. I guess its trial and error.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Uncaught TypeError

Postby Clifton » Mon Feb 16, 2015 10:30 pm

If it happens on several pages, the good thing is that the same problem exists on all of the quiz pages. Track it down in one place and you have a path to solve it on all of them.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Uncaught TypeError

Postby Robert Stevenson » Mon Feb 16, 2015 10:34 pm

I notice that a bunch of these questions provide instant feedback in the form of clips which link to .wav files. I realize this is a "non-no" but I'm curious if this could possibly be the subset of pages that fire this error?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Uncaught TypeError

Postby Clifton » Mon Feb 16, 2015 10:59 pm

You might try a couple of pages where you convert you wav files to mp3 and then use pgSoundLoader() for the on question answered event of the question group. One thing that may be happening is that the Windows Media player is trying to initialize as an activeX control (which is no longer supported in IE11 standards mode) and in other browsers the plugin does not work reliably unless the client computer has it installed. Better to go with HTML5 controls which essentially involves using pgSoundLoader() to play your audio. Should speed up your export too.

NOTE:
When you remove the window media players from a book, you have to remove the extension as well.
See File menu > Extensions ...

Of course, these are just ideas, not necessarily absolute solutions to the problem.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Uncaught TypeError

Postby Robert Stevenson » Mon Feb 16, 2015 11:24 pm

Yep! That seemed to do it.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron