whtopic.js error

New Here ,
Dec 22, 2015 Dec 22, 2015

Copy link to clipboard

Copied

I inherited a RoboHelp project and realized instead of publishing the compiled project, they were simply copying any changed files to the server.  I began publishing the project and our software program began throwing an error related to the whtopic.js file.

Error: The value of the property 'onSetStartPage' is null or undefined, not a function object

URL points to the whtopic.js file contained in Web Help

The coder added the bold line to the code, which seemed to solve the problem.

  gsPPath=_getFullPath(_getPath(document.location.href),
_getPath(sPath));

if (typeof (onSetStartPage) != "undefined")

            onSetStartPage();

My first question, of course, would be, what causes the error and how did the code update fix it.  I also wanted to mention after reviewing WebHelp on the server, I noticed there are multiple instances of the whtopic.js file, as well as another instance of the WebHelp project nested in the original.  Would these be causing conflict?  I'm wondering if it would be safe to delete the entire Web Help project from the server and re-publish everything fresh to see if it corrects the issue.  If not, any suggestions?

TOPICS
WebHelp

Views

1.2K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 22, 2015 Dec 22, 2015

Copy link to clipboard

Copied

I’m presuming that your application is the one calling the help? What happens if you just browse to the location & open up the index page of the webhelp? Do you get any errors thrown then?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 22, 2015 Dec 22, 2015

Copy link to clipboard

Copied

You are correct, the application is calling the Help file. When I browse to the server location and open the index page, there are no errors.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 22, 2015 Dec 22, 2015

Copy link to clipboard

Copied

So you could conclude that the multiple copies you find are messing up which one the app opens & test by backing it all up & reimporting the complete \!SSL!\WebHelp\ contents again.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 22, 2015 Dec 22, 2015

Copy link to clipboard

Copied

Thanks! Just wanted to confirm my suspicions that those may be causing an issue. I'll try to convince the powers that be that we should pursue starting with a clean publication of the project to see if that would eliminate anymore issues!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

On which browsers do you get the errors? All browsers, or just specific ones? And which version of RoboHelp are you using?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

I'm using RoboHelp version 11.  I can open the live project in IE without error.  when the program calls the index file, it opens in a RoboHelp skin for HTML.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 29, 2015 Dec 29, 2015

Copy link to clipboard

Copied

I've taken a look at the code. The OnSetStartPage is included in your topics and the function that breaks can only be called once the topic is loaded. Since the topics work when placed on your computer, there may be a loading issue. How large are your topic files (in KB or lines of content)? Does it occur on all topics or only on a few?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 05, 2016 Jan 05, 2016

Copy link to clipboard

Copied

Hi William,

Sorry for the delay... busy over the holidays!  The error only seems to occur on the "About" topic, which is linked to an ASP file (not sure why). Now that we have moved from 2015 into 2016 and the footer has been updated, the error is occuring again (see image below). The second image is the entire content of the file that causes the error. If I click No to not continue running scripts, the file opens fine.  I am also able to access the main Help file from the same menu without incident.

whtopic.js error.jpgwhtopic.js file.jpg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 06, 2016 Jan 06, 2016

Copy link to clipboard

Copied

What do you mean by 'linked to an ASP file'? Does the about link to an external file? Can you send me the source code of that specific file? (HTML / ASP source) I suspect that you are linking to a file not managed by RoboHelp and that together with the CSH is causing the issue.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 06, 2016 Jan 06, 2016

Copy link to clipboard

Copied

The HTML code for the topic is first and the ASP code is second.

HTML Code for Topic

xml version="1.0" encoding="utf-8"?>

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

html xmlns="http://www.w3.org/1999/xhtml">

head>

meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

meta name="generator" content="Adobe RoboHelp 11" />

title>About Morningstar Office</title>

link rel="StyleSheet" href="../Workstation.css" type="text/css" />

script type="text/javascript" language="JavaScript">

reDo() {

if (innerWidth != origWidth || innerHeight != origHeight)

((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {

null; script>

style type="text/css">

{ position:absolute;:0px;:0px;:4;:hidden; } style>

script type="text/javascript" language="javascript1.2" src="../whmsg.js" charset="utf-8"></script>

script type="text/javascript" language="javascript" src="../whver.js" charset="utf-8"></script>

script type="text/javascript" language="javascript1.2" src="../whutils.js" charset="utf-8"></script>

script type="text/javascript" language="javascript1.2" src="../whproxy.js" charset="utf-8"></script>

script type="text/javascript" language="javascript1.2" src="../whlang.js" charset="utf-8"></script>

script type="text/javascript" language="javascript1.2" src="../whtopic.js" charset="utf-8"></script>

head>

body><script type="text/javascript" language="javascript1.2">//<![CDATA[

(window.gbWhTopic)

var strUrl = document.location.href;

var bc = 0;

var n = strUrl.toLowerCase().indexOf("bc-");

if(n != -1)

if (window.addTocInfo)

"show",BTN_TEXT,"Show","","","","",0,0,"","","");

if (window.writeBtnStyle)

if (window.writeIntopicBar)

"<p style=\"text-align:right\"> ");

"../Advisor_Workstation_Office.htm", "", ">", "Home", "Welcome.htm");

"About Morningstar Office<\/p>");

if (window.gbIE4)

function()

if (window.setRelStartPage)

"setRelStartPage('../Advisor_Workstation_Office.htm');", 1)

"UpdateBreadCrumbsMarker();", 1);

(window.addEventListener){ 

'load', onLoadHandler, false);  

else if (window.attachEvent){ 

'onload', onLoadHandler); 

onSetStartPage()

</script>

script type="text/javascript" src="../ehlpdhtm.js" language="JavaScript1.2"></script>

div style="width: 100%; position: relative;" id="header">

<p><img src="../Morningstar_Office_Logo_for_Webex.jpg" alt="" style="border: none;" border="0" /></p>

div>

h1 style="margin-left: 8px;">About Morningstar Office<span style="vertical-align: Super; font-size: 7pt;"><font size="1" style="font-size:7pt;">SM</font></span></h1>

p>Version 3.11.002.10</p>

p>Morningstar Office<span style="font-size: 6pt; vertical-align: Super;"><font size="1" style="font-size:6pt;">SM</font></span> is a service mark of Morningstar.</p>

p>Click <a href="http://admainnew.morningstar.com/articles/tutorial/30/MorningstarOfficeTechSpec.pdf">here</a> for technical specifications.&#160;</p>

div style="width: 100%; position: relative;" id="footer">

<p style="font-size: 8pt;">©2016 Morningstar. All Rights Reserved.</p>

div>

script type="text/javascript" language="javascript1.2">//<![CDATA[

(window.writeIntopicBar)

</script>

body>

html>

ASP File Code

<%
dim ver
ver = "" & Request.QueryString("ver")
if Len(ver) <> 0 then
  ver = Mid(ver,4,Len(ver))
end if
%>
<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<!--(==============================================================)-->

<!--(Document created with RoboEditor. )============================-->

<!--(==============================================================)-->

<head>

<title>About Advisor Workstation Office Edition</title>

<!--(Meta)==========================================================-->

<meta http-equiv=content-type content="text/html; charset=windows-1252">
<meta name="template" content="Header_Footer.htt">
<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=1>
<meta name=layout-height content=624>
<meta name=layout-width content=905>


<!--(Links)=========================================================-->

<link rel='stylesheet' href='../Workstation_ns.css'>
<script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='../Workstation.css'>");}
//-->
</script>
<style type="text/css">
<!--
h1.whs1 {margin-left: 8px;}
div.whs2 {width: 100%; }
-->
</style>
<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
//-->
</script>
<style type="text/css">
<!--
  div.WebHelpPopupMenu {position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;}
-->
</style>
<script type="text/javascript" language="javascript1.2" src="../whmsg.js"></script>
<script type="text/javascript" language="javascript" src="../whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="../whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="../whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="../whtopic.js"></script>
</head>

<!--(Body)==========================================================-->


<body>

<script type="text/javascript" language="javascript1.2">

<!--
if (window.gbWhTopic)
{
if (window.addTocInfo)
{
addButton("show",BTN_TEXT,"Show","","","","",0,0,"","","");

}
if (window.writeBtnStyle)
  writeBtnStyle();

if (window.writeIntopicBar)
  writeIntopicBar(1);

if (window.setRelStartPage)
{
setRelStartPage("../Advisor_Workstation_Office_3.htm");

  autoSync(1);
  sendSyncInfo();
  sendAveInfoOut();
}
}
else
if (window.gbIE4)
  document.location.reload();
//-->
</script>
<h1 class="whs1">About Morningstar Office<span
style="vertical-align: Super; font-size: 7pt;"><font size=1 style="font-size:7pt;">SM</font></span>
</h1>

<p>Version <%=ver%></p>

<p>Morningstar Office<span style="font-size: 6pt; vertical-align: Super;"><font size=1 style="font-size:6pt;">SM</font></span>  is a service mark of Morningstar.</p>

<p>Click <a href="http://admainnew.morningstar.com/articles/tutorial/30/MorningstarOfficeTechSpec.pdf">here</a>
for technical specifications.  </p>

 

<div placeholder id="footer" class="whs2">
<form><input TYPE=BUTTON
          NAME=print
          Font-size=8pt
          VALUE=Print
          ONCLICK="javascript:window.print()">
</form>
<p>©2016 Morningstar. All Rights Reserved. </p>
</div>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
writeIntopicBar(0);
//-->
</script>
</body>

</html>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 09, 2016 Jan 09, 2016

Copy link to clipboard

Copied

How did you get by the ASP file? It seems to be originally generated by a very old version of RoboHelp. I think this ASP file is so old that it's not a surprise that it has broken.

Do you know why you have an ASP page instead of a regular topic?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2016 Jan 12, 2016

Copy link to clipboard

Copied

I'm not sure what you mean by "get by the ASP file". If you mean, how did we get the ASP file to work, the coder added the javascript code noted in the first post.

I have NO idea why there is an ASP file associated with the topic. I inherited this project and everyone is afraid to do anything different than how it's always been done.   I will see if I can get a response from the coder as to why this topic is special enough to require the ASP code. If there's not a good reason, I vote for removing it!

Thanks again for all your help and questions!!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2016 Jan 12, 2016

Copy link to clipboard

Copied

One way to test things would be to isolate that specific topic. Just copy only that HTML file from your PC to the server and open it from the server. I would expect that action to reveal what the ASP code is doing (or attempting to do).

Cheers... Rick

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2016 Jan 12, 2016

Copy link to clipboard

Copied

After more research, I think they are calling the ASP file directly from the link in the program menu.  The ASP file pulls in the correct program version and contains a print button. The HTML file doesn't do either.

Now, I'm going to go back to the file causing the original error, whtopic.js.  Is this file generated by RoboHelp each time the project is compiled or each time it is published?  The coder made the original change within the js file on the server and I don't think I have the same file stored locally.  I have copied the server file into my project now, made the coder's update and will try regenerating and publishing help to the server again. Hopefully that will fix the issue!!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 13, 2016 Jan 13, 2016

Copy link to clipboard

Copied

LATEST

The whtopic.js file is generated every time you craete an output. You can modify the seed file in your RoboHelp installation directory, but you can't overwrite the file. There are some macro's in the file that RH uses on generation.

I believe the ASP file is at fault here. It's a very old file with unsupported JavaScript in it. The person who originally made the file, can probably udpate the file to the new JS content. If you open any generated topic in notepad, you can see the required JS code.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation