subModal() Failing?

Confirmed or possible bug reports and workarounds

subModal() Failing?

Postby PetrH » Sun Apr 24, 2016 8:44 pm

I am using Toolbook 11.5 with Patch 4 installed. I'm working on some older projects that were produced with Toolbook 11.5 and an earlier version of the PowerPac where this function worked perfectly. In an attempt to get it to work again, I just updated the PowerPac to 12.904.1.

I am using a relative path to a folder full of html files and when I examine the exported content, the html files are where they should be. When I publish the book and test my menus, anything that uses the subModal() function is failing.

Any suggestions on how I can troubleshoot this issue so I can get my project back on schedule?

Thanks,
Pete
Peter
Always available for Toolbook work.
[email protected]
PetrH
 
Posts: 22
Joined: Mon Jan 20, 2014 11:29 pm

Re: subModal() Failing?

Postby Clifton » Sun Apr 24, 2016 9:58 pm

Can you provide screen shot of the subModal() parameter setup?
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: subModal() Failing?

Postby PetrH » Tue Apr 26, 2016 8:51 pm

Hi Clifton,

This is an image of the parameters, pieced together from a number of screen caps:

Image

This is an image of the folder structure after publishing:

Image

This code is working in a released version of this project from 18 months ago. Now that I'm trying to go back and make a few updates it isn't working. The source files were moved from a backup device to my dev computer and everything seems set up correctly but I just can't get it to work. I am actually working to rebuild the source Toolbook project because the original was lost in a server crash so the working version of the published project is all I have to reproduce the original source file.

I've used the same logic in other projects for the same client, that used the same overall design and they are not working either on my dev machine (Win 10).

Thanks,
Pete
Peter
Always available for Toolbook work.
[email protected]
PetrH
 
Posts: 22
Joined: Mon Jan 20, 2014 11:29 pm

Re: subModal() Failing?

Postby Clifton » Tue Apr 26, 2016 9:46 pm

I created this sample page and it seems to work.
Used these parameters ... a little smaller than yours but only for sake of this example.
Image 1.png
subModal() parameters
Image 1.png (27.94 KiB) Viewed 8724 times

Then I created a file called Instructions.html which is pretty basic and placed it into a folder called notes like in your project.
    My DHTML Export Tree look like this:
    Image 3.png
    DHTML Export Tree
    Image 3.png (96.44 KiB) Viewed 8724 times
On export, clicking the button runs subModal() and produced this result:
Image 2.png
Exported page and dialog
Image 2.png (12.19 KiB) Viewed 8724 times

If your is failing ...
  • Does the dialog open at all?
  • Does it open but no web page is shown?
  • Other? ... are there errors?
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: subModal() Failing?

Postby PetrH » Thu Apr 28, 2016 7:12 pm

Actually now that I've tested it again, the published book is throwing an error before the main menu page loads. It is on that main menu page that I first have code that uses the subModal function.

If I enable an action in my shared action to pop an alert with the value of the parameter passed to the share action it shows the correct value.

In IE11 I get a "Syntax error (line number 52).

I just tried to run the published book with Firefox and got this error message as the project loaded:

"SyntaxError: expected expression, got '<' (line number 1)"

A quick test with Chrome revealed a similar error message.

I don't know what might be wrong. Haven't touched the code since it was last working. Did you see anything wrong with my set up of the function?

Thanks,
Pete
Peter
Always available for Toolbook work.
[email protected]
PetrH
 
Posts: 22
Joined: Mon Jan 20, 2014 11:29 pm

Re: subModal() Failing?

Postby Clifton » Thu Apr 28, 2016 7:50 pm

Not sure what to tell you, but if you zip up a couple of the opening pages which exhibit the issue, I can take a look and at least rule out a PowerPac issue. If a JavaScript fails to execute properly, it will stop the load process of anything after the error is encountered. The same is true with actions, which are JavaScript code in the export.

Sometimes Firefox, with the firebug extension and the Developer tools add-on can be a great help in pin-pointing exactly where the failure exists.

If want to send a zipped export, make sure to uncheck the item shown below as it makes troubleshooting easier.
Image 1.png
UNCHECK option to optimize PowerPac files
Image 1.png (96.18 KiB) Viewed 8720 times

Mail to: [email protected]
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: subModal() Failing?

Postby PetrH » Fri Apr 29, 2016 8:13 am

Hi Clifton and thanks for taking a look at that portion of my project. Clearly your code must be working just fine because it is running for you, in multiple browsers, without a problem. That means the problem is local to my computer.

What is driving me crazy is the fact that an earlier version of this course is running perfectly fine on the same computer and there were no code changes!

I have tested the same project I sent to you on another computer, here in my office. IE11 on that computer throws the same error BUT the book loads and the code calling the subModal() function is working! The expected HTML file opens like a dialog as it should. However, the Toolbook page is still throwing an error. That other computer is still running Windows 7 while my primary dev computer, where it completely fails, is Windows 10. I wonder if that might have anything to do with it.

I will update this thread when I have more information, just so there is some sort of conclusion to it. :-)

Pete
PetrH
 
Posts: 22
Joined: Mon Jan 20, 2014 11:29 pm

Re: subModal() Failing?

Postby Clifton » Fri Apr 29, 2016 10:24 am

Of course, the content should pretty much run everywhere. So I am very interested in what may be causing these issues. I will try the content on Windows 10 here just to eliminate that as an issue.

Just a thought, but do you have any extensions loaded in this project like the WMP? That would probably cause issues, especially on Windows 10.

UPDATES:
Please run a test of your content with the file SCORM12_LimitSuspend_Data.js disabled. Just rename it in the content and see what happens. If that fixes the problem, let me know as I think I know why code like that would cause issues and possible workarounds.

WINDOWS 10: Works for me!
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: subModal() Failing?

Postby PetrH » Sat Apr 30, 2016 8:59 am

Hi Clifton,

I've renamed that SCORM12_LimitSuspend_Data.js file and ran the lesson again but with the same results. I recall working with that file a long time ago because we were having problems with an LMS but I don't think it is needed any longer and I can't find any reference to it in my project.

The good news is that I've been able to build a fresh one page book and successfully use the subModal() function as a test and it works. That makes me think something else is bombing in the main project. Probably something related to some other actions. A validation effort turns up nothing wrong so my next step is to make a copy of the book and just start deleting things and publishing until I narrow it down to the offending object. I'll update the thread with the results of that effort.

Pete
Peter
Always available for Toolbook work.
[email protected]
PetrH
 
Posts: 22
Joined: Mon Jan 20, 2014 11:29 pm

Re: subModal() Failing?

Postby PetrH » Sun May 08, 2016 8:01 am

Just to close this thread out properly, I'll admit that there was some error in my project that was causing a javascript error which was causing everthing to fail. The only way I was able to fix the problem was to rebuild the first couple of pages of the book and then import all 285 of the remaining pages.

Based on the error logs generated during my attempts to publish incremental versions it appears that toolbook was holding on to code for objects removed. I say that because the errors were referring to properties of objects that no longer were in the book.
Peter
Always available for Toolbook work.
[email protected]
PetrH
 
Posts: 22
Joined: Mon Jan 20, 2014 11:29 pm

Next

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 5 guests

cron