Script Error

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
tomlowe
Jr. Propeller Head
Posts: 9
Joined: Thu Feb 20, 2014 4:14 am

Script Error

Post by tomlowe »

Apologies for adding another script error topic but I have attempted to fish through previous entries without any luck.

Whenever we open the help file within our application it gives the script error:

Line: 2557
Char: 9
Error: Unable to get property 'getElementsByTagName' of undefined or null reference
Code: 0
URL: mk:@MSIT:C:\PROGRA~2\VOYAGE1\Infinity\VOYAGE3.CHM::/SkinSupport/MadCapUtilities.js

Clicking yes or no has no noticeable impact but the error returns whenever clicking into other topics.

Strangely, when I open the CHM directly, there are no errors at all. It also works fine within the application on the server, only the TS users are affected.

Actions I have already completed are:
1. Set the Start-up Topic (this was already set anyway but have changed it built and tested but still the problem occurs)
2. Checked IE settings but these are already set to disable script debugging and un-ticked to notify of every script error
3. Emailed support - who want a copy of the application, unfortunately it is a SQL database and this is not an option (have offered dial in access but I guess support are in the states, so timings are not ideal)

The problem has been occurring for customers with our hosted environment which are Windows Server 2008 R2 Terminal Servers, using IE11. The project was created with Flare 8.1.2

Any clues or ideas would be gratefully received.
Blork
Jr. Propeller Head
Posts: 3
Joined: Tue Feb 25, 2014 3:22 pm

Re: Script Error

Post by Blork »

Just waving my hand to say I have the same problem as the OP. I'm not sure it's in the same file though, as the path is truncated due to length (I can see that it's in the SkinSupport folder, but I can't see which actual file). Also, in my case it's line 2549.

The error appears pretty much any time I touch any page in Flare, which makes it extremely frustrating to work on.

I'm pretty much a total n00b at Flare, so if anyone has a solution, please explain it with clear abundance. :-)
Blork
Jr. Propeller Head
Posts: 3
Joined: Tue Feb 25, 2014 3:22 pm

Re: Script Error

Post by Blork »

Hey, me again. I did some investigating and I found the offending JS line:

File:
../MadCap Flare V8/Flare.app/Resources/Flare.mchelpf/Content/SkinSupport/MadCapUtilities.js

Line 2549:
var styleNodes = mRootNode.getElementsByTagName("Style");


The script error says "Unable to get property 'getElementsByTagName' of undefined or null reference.

OK, so what the heck is wrong with that line that it's causing the error? What is the "underfined or null reference?" Is that "Style?" If so, how do I fix it so it's no longer undefined or "null?"
tomlowe
Jr. Propeller Head
Posts: 9
Joined: Thu Feb 20, 2014 4:14 am

Re: Script Error

Post by tomlowe »

So I have been assisted by MadCap support and have basically been asked to run the project through a trial version of Flare 9 and it works fine, therefore indicating it is Flare rather than environmental/setup (although the trial version inputs random characters into the CHM file). Will let you know the conclusion but if anyone else more technical than I are aware of a fix I would still be very grateful.
KurtOW
Jr. Propeller Head
Posts: 4
Joined: Mon Feb 17, 2014 5:43 am

Re: Script Error

Post by KurtOW »

This problem is caused by IE11/IE10 (regardless of whether it is your default browser). I downgraded to IE9 to resolve this issue.
tomlowe
Jr. Propeller Head
Posts: 9
Joined: Thu Feb 20, 2014 4:14 am

Re: Script Error

Post by tomlowe »

Madcap support sent me a patch, basically the .js file that was affecting the output. It has resolved the script error. :)
haneefms7
Jr. Propeller Head
Posts: 1
Joined: Wed Jul 01, 2015 4:18 am

Re: Script Error

Post by haneefms7 »

Guys even am facing the same error ''Unable to get property 'getElementsByTagName' of undefined or null reference'', can any one please tell me the exact solution for this, am using madcap flare 8.

Thanks in advance. :D
Post Reply