Copy link to clipboard
Copied
Dear all,
we're working on a RoboHelp 7 project under version control.
Today we encountered a major issue with ur project/database. When opening files in the preview window, they are displayed without error. As soon you click on a link within this file that leads to another HTML file, you get a pop-up with a runtime error message. You're asked either to debug or not. Selecting no displays a second runtime error with the same question. After also declining, you get to the selected HTML file.
We have two major sorts of files: Chapter overview pages and topic files. Both are based on the same Style Sheet (CSS) and template. For the overview files the layout is just changed a bit when you create the file. Further there are some extra files don't use the template.
Now I recognized some kind of logic:
- When you open an overview-file, the two pop-ups always refer to runtime errors in line 46 and 49.
- When you open a topic file, the two pop-ups always refer to runtime errors in line 50 and 53.
- When you open a file that is blank and not based on the template, there's no error.
Until now, the error never occured. But since today (or maybe last week und we didn't recognize), this error comes up even for files that were created months ago and never had an error before. They were changed today automatically when a renamed a chapter. Even within our "clean and working" backups we now encounter this error.
Questions:
- Can anyone explain, what a runtime error is at all?
- My assumption is, that it has something to do with the CSS or template, but I'm not sure. What can be wrong there?
- To what lines do the specifications in the pop-up refer to? Where can I find those lines?
As we are in a very critical project phase, I really need your assistance for a quick and effective solution. Please help me as soon as possible!! Thanks!!
Copy link to clipboard
Copied
Hi,
A runtime error refers to a scripting error, probably a javascript error. This rules out the CSS, although it can be in your Template.
Check the message to see if the error is in the topic itself, or in a referenced javascript.
If it is in your topic, open the topic with the File preview. Continue executing the scripts if you are asked if you want that. Then, right click in the page and select View Source. Copy the source code into some editor that has line numbers and check out those lines.
Did anything change on your system recently? An internet explorer update?
Did you change a custom javascript that you use on every page?
Do you have a javascript embedded in your template or in a snippet/variable?
Greet,
Willam
Copy link to clipboard
Copied
The preview window is a display of a temporary file created by RH, which is named Rltxxx.htm (the xxx is a sequential number assigned for each preview instance). While you have that preview window open, access the project's source folder in Win Explorer and open the file in Notepad. (If you have more than one Rltxxx.htm file, that means that you had somehow not closed a previous preview window properly; just delete them all and reopen the preview.)
Are these links running OK in your compiled output? If so, I'd just forget about it and move on. Of course, Willam's suggestions could also prove helpful to you.
Good luck,
Leon
Copy link to clipboard
Copied
There was no update on the system in the last months, in particular in the last days around the error occurence. Another action may have had an impact: A central folder in the project manager was renamed. In this chapter there are files all affected files are linked to. So they were updated (and therefore checked out, changed, saved) automatically be RoboHelp. This may have spread the error. At least I discovered the error right after this action. Renaming the folder back didn't help.
In the meantime we tried to isolate the error cause. The mentioned code lines refer to two links that are incorporated in the header of every file.
It seems to be a problem with the template we use and here something with those two links in the header. So, yes, we use javascript.
Now I rebuilt the links again in the template header and re-applied the style sheet to some files for testing. After that procedure the error didn't occur in these files any more - temporarily. After I closed the project and opened it again the other day, the error was back. So the changes didn't have an enduring effect, although I saved and checked in the whole project properly.
So might there be another problem?
The compiled HTML output is not affected. However, we can't just go forward without a solution. This project will be administrated by another team we're working for right now. So we need to hand over a clean solution.
In addition we have a similiar problem with the compiled CHM-file. In there, scripting errors a displayed when a user tries to open a chapter. In most cases, the document ist not display then. Sometimes it is possible to navigate into the content by links on the content slide, but the chapter in the TOC doesn't open. For this phenomenon, we don't have an explanation nor solution yet.
Any ideas?
Thanks!
Copy link to clipboard
Copied
Hi,
Can you post the mentioned lines or your template so we can have a look?
Greet,
Willam
Copy link to clipboard
Copied
Hi,
the mentioned lines in the template are below. I marked in red those two lines the debugger highlights. The error message states "Object expected."
Hopefully this piece of code helps to clarify.
Thanks!
<div placeholder id=header style="width: 100%; position: relative;">
<table x-use-null-cells style="width: 100%; x-cell-content-align: Bottom; border-spacing: 0px; border-spacing: 0px;"
cellspacing=0 width=100%>
<col style="width: 100%;">
<tr style="x-cell-content-align: bottom; height: 14px;" valign=bottom>
<td colspan=1 rowspan=1 style="width: 100%; x-cell-content-align: center; background-color: #cccccc;"
bgcolor=#CCCCCC valign=middle width=100%>
<p class=TopBanner style="font-family: '@Arial Unicode MS'; margin-top: 4.5pt;"><spaces> </spaces><span
style="text-transform: uppercase;"><a href="#" onclick="window.print();return false"
title="Print" style="font-size: 8pt; font-weight: bold; background-color: Transparent; font-family: '@Arial Unicode MS';
color: 'Text Gray'; text-decoration: underline; ">PRINT
TOPIC</a></span> <spaces> </spaces>| <spaces> </spaces><span
style="font-size: 8pt; text-transform: uppercase; font-weight: bold;"><a
href="javascript:BSSCPopup('Popup1.htm',450,120);"
id=a3>Link for pop-up 1</a><robohelp><script type="text/javascript"
language=JavaScript1.2><!--
FilePopupInit('a3');
//--></script></robohelp></span>
<spaces> </spaces>| <spaces> </spaces><span style="font-size: 8pt; text-transform: uppercase; font-weight: bold;"><a
href="javascript:BSSCPopup('Popup2.htm');" id=a4>Link for pop-up 2</a><robohelp><script
type="text/javascript" language=JavaScript1.2><!--
FilePopupInit('a4');
//--></script></robohelp></span></td></tr>
</table>
</div>
Copy link to clipboard
Copied
Hi,
What is the complete error message? Object expected suggests that the function FilePopupInit cannot be found. This function is in ehlpdhtm.js, and in this code, you use it with a custom size popup.
Since you're using a standard RH-functionality, you can also try removing the hyperlinks from the header in your template. Saving and then adding the popups again. (Backup your project first). Robo should automatically add a link to ehlpdhtm.js
If that doesn't work, check the following:
Check the HTML of a few topics and see whether ehlpdhtm.js is included in the head section (above </head>) like this: <scripttype="text/javascript" language=JavaScript1.2 src="../../ehlpdhtm.js" x-save-method=compute-relative></script>
And also:
I tried creating a header with popups of different kinds and puttinglinks in those, but it all worked in my test project. What kind oflinks did you add to the popup?
Greet,
Willam
Copy link to clipboard
Copied
Hi William,
thanks for your notes.
The error message says:
"A Runtime Error has occurred. Do you wish to Debug?
Line: 46
Error: Object expected
[Yes] [No]"
[Yes] leads to the debugger with the indication listed in my further entry.
[No] leads to the second pop-up, showing the same text for line 49.
That's all. I attached a screenshot of the pop-up to this message.
I already removed the links from the template header and to re-create them again. The difference to your approach seems to save the file in between and not till then re-create the links. I will try this out and come back.
The mentioned ehlpdhtml.js is embedded in a very similar piece of code, but listed at the very start of the body - not within the header.
What is the meaning of having this in the head section instead or in addition to the body?
The pop-up links we've incorporated in the header represent two types: an auto-sized pop-up and a custom-sized pop-up.
Does this make a difference, what kind of link/pop-up is incorporated there?
Thanks, Tom
Copy link to clipboard
Copied
In the meantime we've resolved the issue. The problem was the header of our template, as already assumed.
The links in the header must not be pop-ups. So we changed those two links to open as separate pages in a new window.
You don't need to apply the template new to the topic files. This is executed automatically.
The compiled CHM file works fine now.
Also the runtime error in the preview doesn't occur any more.
Just one question is left for technical understanding: Why don't the pop-ups work when integrated in the header?
Thanks to all for asking questions and giving hints.
Greets,
Tom
Copy link to clipboard
Copied
Hi Tom
Here is my own educated guess.
When you have links of any type in a HTML document, a calculation has to occur at the time they are created. The application has to calculate where the linked item is in relation to the existing page. Then HTML shorthand is created to navigate. Up a folder level is ../ and up two folder levels is ../../. Stuff like that.
Popups are a different story. While you are still creating links, these beasties are actually handled using JavaScript. So the path is supplied in the call to the JavaScript.
As if that weren't complex enough, we now toss Headers and Footers into the mix. Headers and Footers are tied to the Master Page. The Master Page is always in the root level of the project. Links in a Header and Footers often break because of the assorted locations of HTML pages if you are using folders to organize your project. So when you create the link initially as part of the Master Page, things are dandy and as long as the topic is in the project root folder (same as the Master Page) things would likely work fine. But if that Master Page is associated with a topic inside a folder level or two down, things can go to pot in a hurry! (Where are we all headed? And what's with the handbasket?)
Hopefully this helps shed some possible explanation... Rick ![]()
| Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more