Skip to main content
Known Participant
May 18, 2010
Question

Links to external files don't work

  • May 18, 2010
  • 1 reply
  • 5056 views

Hello

Using RH 8.02 and converting linked Word docs (Word 2002) to WebHelp. These are policies and procedures that reference external documents.

In my Word doc I have a hyperlink to an external document. This doc is on a network server. In Word I added the hyperlink and it appeared as a relative path, such as ../RelatedDocs/RelDoc1.doc.

The referenced file is an external file, and I don't want to add it to RH because it may be updated; I just want to link to it so that a user gets the latest version.

When I update the HTML files in RH I see this in my HTML file:

<a href="file:////terminus/avbase_techsupport/av-base documents/supportmaster/documentationshare/relateddocs/reldoc1.doc">Related Doc 1</a>

This is the correct absolute path for the referenced file. Note the file://// prefix, with four forward slashes.

When I generate WebHelp, the link doesn't work. Nothing happens.

I tried the following:

1. Copied the whole path into my Windows Start > Run box and hit Enter. Nothing happens.

2. Removed two of the forward slashes and copied it again into the Run box. Now the file opens in Word.

I also tried removing the hyperlinks from the Word docs and adding them through RH instead. Same result.

Why does RH add four forward slashes to the prefix? What can I do to get these external links working?

Thanks for your help.

Roger Shuttleworth

London, Canada

This topic has been closed for replies.

1 reply

Peter Grainge
Community Expert
Community Expert
May 19, 2010

You are saying when you add the relative path from the topic where it is on the server to where the document is located, RoboHelp is amending it?

How are you entering the link?


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
shuttie27Author
Known Participant
May 20, 2010

Hello Peter

I apologize for taking so long to respond. I just received a new computer with Vista and have had to set it up. Here is what happens:

1. In Word, I have a doc policy1.doc that contains a hyperlink to reldoc1.doc. The two files are in different folders. When I insert the link, Word shows it as a relative path ../RelatedDocs/reldoc1.doc. When I hover over it in the Word doc, it shows as an absolute path starting with file:///\\theserver, etc.

2. My RH project includes policy1.doc but not reldoc1.doc. I update policy1.doc in RH. In the HTML topic file (HTML view) the link is:

<a href="file:////theserver/path/reldoc1.doc">Link text</a>. Note the four forward slashes.

3. I save all project files and generate WebHelp.

4. In the resultant web page (in Firefox), I click the link in policy1 and nothing happens. The status bar shows the path the same as above.

5. I navigate to the output !SSL! and find the index page, and open it in Internet Explorer 8. The link shows in the status bar as file://theserver/path/reldoc1.doc, and when clicked IE opens the Word doc.

So in this case Firefox doesn't open the link but IE does.

Here is another scenario:

1. I have no links in myWord docs.

2. I generate topic files in RH using the linked Word docs.

3. In RH, in the HTML file for policy1 (policy1.htm) I add a link to reldoc1.doc. I choose the file protocol. RH asks me if I want to copy the doc into the project folder, and I say No.

4. I check the HTML for policy1.htm and see that it has the link as follows:

<a href="file://J:/Documents/rest of folder path/RelDoc1.doc">Related Doc 1</a>

(Going to Hyperlink Properties shows the same path.) Note the two forward slashes.

5. I save all files in the project and click Generate Primary Layout (which is WebHelp). A dialog asks if I want to update <some file or other, but I can't see which one because that darned dialog box is too small, but I expect it's policy1.htm>.

6. I say No. The output is generated and I view it in Firefox. The link works and has a path in the status bar as:

<a href="file://J:/Documents/rest of folder path/RelDoc1.doc">Related Doc 1</a>
Note the three forward slashes.

7. I view the index.htm file in IE and it works.

As a variant of the above, instead of saying No when asked if I want to update the file, I say Yes.

1.The HTML of policy1.htm now shows the link as:

<a href="file:////server/rest of path/reldoc1.doc">Related Doc 1</a>

Note the four forward slashes again.

2. The link is as shown in the status bar of Firefox is now set to:

<a href="file:////server/rest of path/reldoc1.doc">Related Doc 1</a>
It doesn't work.

2. The same link shown in IE status bar has two forward slashes (even though the source has four), and it works.

So in answer to your question, the link definitely changes within RH. The two browsers deal with things differently, with IE seeing a file://// link as file://.

Incidentally, I did some research on the file:// protocol and came up with:

http://kb.mozillazine.org/Firefox_:_Issues_:_Links_to_Local_Pages_Don%27t_Work

The answer seems to be:

1. Add the links within RH.

2. Don't update when generating output.

3. If possible, get users to use IE instead of FF.

Either way, it's not very satisfactory for my purposes.

Regards,

Roger

Peter Grainge
Community Expert
Community Expert
May 21, 2010

Hi Peter

Your description of the scenario is correct. However, when you say, "I doubt RH would change the cross document links," it seems to me that that is exactly what it is doing. Both the file:// protocol prefix and the path change, depending on whether you choose Yes or No when it asks if you want to update the file. In the one case it uses the drive letter; in the other the server name.

Choosing Yes, the final result is file:////. IE reads this as file:// and works OK. Firefox reads it as file://// and refuses to open the link.

One option is for me to change all file://// links to file://///, which both IE and Firefox will open.

However, it's not really just "a single link". This is meant to be a system of policies and procedures that reference other documents (.doc, .pdf, etc.). Those documents will be updated from time to time, as will the policies and procedures. So every time I update my project I'll have to change all the links again.

It's doable, but not ideal. I guess my "real" question is why RH insists on creating links that use file://// when it is well known that Firefox won't touch them. If it used file:// or file:///// instead there would be no issue. (The other question is whether I can make it do that, but I guess the answer is no.)

Thanks again.

Roger


You are saying that RH amends the link you created in Word and that link is to another Word document. As only the first document is part of your project I am not clear how RH can know how to rewrite it but let's worry about that later.

When you create the link how does Word write it? How is the path written?

Then show how that gets amended in RH.

If that doesn't get us anywhere, I might need you to mock up a project so that I can see this happening.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.