Page 1 of 1
Why does Flare use absolute paths instead of relative?
Posted: Mon Jan 11, 2016 4:00 pm
by sdcinvan
I've noticed this undesirable behavior before and even though it hasn't bit me yet, I can see this being a problem if I need portable Flare source files.
I just inserted a link to another topic in the same document and noticed that Flare recorded it as an absolute path:
Code: Select all
<a href="file:///D:/_Projects/Flare/UG/Content/007-00xxNA-UG/140_management_ui.htm">
This would be very messy if I needed to transfer the document source files to another computer where there is no "d" drive.
Ideally, Flare should have captured a relative path like...
Code: Select all
<a href="file:/Content/007-00xxNA-UG/140_management_ui.htm">
...where the /Content path is assumed to be in the same folder as the project file.
Before I contact MadCap support or rather, feature requests, I just want to make sure that I am thinking about this correctly.
Thank you,
Shawn
Re: Why does Flare use absolute paths instead of relative?
Posted: Tue Jan 12, 2016 12:32 am
by DocuWil
Hi Shawn,
Just to inform you that I do
not notice that behavior.
Example:
Code: Select all
<MadCap:xref href="../How to/Deal with colors.htm"><u><span style="color: Blue;" class="mcFormatColor">Colors</span></u> <i>(described on page 1)</i></MadCap:xref>.</p>
Re: Why does Flare use absolute paths instead of relative?
Posted: Tue Jan 12, 2016 11:29 am
by sdcinvan
Hello Wil,
Thanks for your reply. I think I should have clarified that this happens only under certain circumstances because it isn't a consistent problem.
I decided to actually determine when it happens and it turns out that that absolute links are captured when using Insert Hyperlink > Link to External File. The external file is recorded like, "file:///D:/file path and name". I suppose this is file if the external file is located outside of the project's path but otherwise it should be a relative path.
I don't see this very often because I am more likely to create links using the Quick Link option.
Re: Why does Flare use absolute paths instead of relative?
Posted: Tue Jan 12, 2016 3:19 pm
by wclass
A full path to an external file makes sense to me - we use that to point to general policies etc on a server and they are not relative once the project is built and published.
If you link to a file within your project why are you setting it as an external link anyway? If you use "Insert Hyperlink > Link to file in this project" it will create a relative link.
Re: Why does Flare use absolute paths instead of relative?
Posted: Tue Jan 12, 2016 6:29 pm
by sdcinvan
wclass wrote:A full path to an external file makes sense to me - we use that to point to general policies etc on a server and they are not relative once the project is built and published.
If you link to a file within your project why are you setting it as an external link anyway? If you use "Insert Hyperlink > Link to file in this project" it will create a relative link.
I honestly cannot recall why.
I guess I'll just chock this one up to a goofball moment that I have repeated from time to time. I'll be more aware of this in the future.
Thanks all!

Re: Why does Flare use absolute paths instead of relative?
Posted: Tue Jan 12, 2016 6:46 pm
by sdcinvan
OT but speaking of paths, I do have a weird one...
For PDF publication, I have attached a link to the table of contents on the logo that appears in the footer of a Global Project Linked page layout.
The code is:
Code: Select all
<xhtml:td xhtml:style="text-align: left;padding-left: 2px;padding-right: 2px;padding-top: 2px;padding-bottom: 2px;"><xhtml:a xhtml:href="../../glb_topics/glb_0i_toc.htm"><xhtml:img xhtml:src="../../glb_images/coho_logo.svg" xhtml:style="font-family: Calibri;font-weight: bold;color: #d84127;vertical-align: middle;width: auto;height: 20px;font-size: 8pt;" /><
From the above, the path is correctly set as a relative path,
../../glb_topics/glb_0i_toc.htm
But after publishing, when I click on the logo, in the Adobe PDF reader, the following error appears:
Could not open the file '../../../../../../Content/glb_topics/glb_0i_toc.htm.
Notice the expansion of the path... like some kind of recursive problem occurring.
Any thoughts on why this is happening?
Thank you
Re: Why does Flare use absolute paths instead of relative?
Posted: Thu Jan 14, 2016 1:01 pm
by sdcinvan
sdcinvan wrote:OT but speaking of paths, I do have a weird one...
For PDF publication, I have attached a link to the table of contents on the logo that appears in the footer of a Global Project Linked page layout.
The code is:
Code: Select all
<xhtml:td xhtml:style="text-align: left;padding-left: 2px;padding-right: 2px;padding-top: 2px;padding-bottom: 2px;"><xhtml:a xhtml:href="../../glb_topics/glb_0i_toc.htm"><xhtml:img xhtml:src="../../glb_images/coho_logo.svg" xhtml:style="font-family: Calibri;font-weight: bold;color: #d84127;vertical-align: middle;width: auto;height: 20px;font-size: 8pt;" /><
From the above, the path is correctly set as a relative path,
../../glb_topics/glb_0i_toc.htm
But after publishing, when I click on the logo, in the Adobe PDF reader, the following error appears:
Could not open the file '../../../../../../Content/glb_topics/glb_0i_toc.htm.
Notice the expansion of the path... like some kind of recursive problem occurring.
Any thoughts on why this is happening?
Thank you
It turns out that this is a bug. Madcap support has logged this as bug#51768.