Why does Flare use absolute paths instead of relative?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
sdcinvan
Propellus Maximus
Posts: 1260
Joined: Wed Aug 21, 2013 11:46 am
Location: Vancouver, Canada

Why does Flare use absolute paths instead of relative?

Post 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
Shawn in Vancouver, Canada
Main tools used: Flare 11.x, InDesign, Google Docs, Lectora, Captivate.
Report bugs: https://www.madcapsoftware.com/feedback/bugs.aspx ▪ Feature requests: https://www.madcapsoftware.com/feedback ... quest.aspx[/i]
DocuWil
Sr. Propeller Head
Posts: 344
Joined: Thu Feb 09, 2006 1:22 am
Location: Netherlands
Contact:

Re: Why does Flare use absolute paths instead of relative?

Post 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>
Wil Veenstra

Documentation and Training Centre
Infologic Nederland
(Using Flare 11.1.2, Capture 7.0.0 and Mimic 7.0.0 in Windows 10 64-bit)
sdcinvan
Propellus Maximus
Posts: 1260
Joined: Wed Aug 21, 2013 11:46 am
Location: Vancouver, Canada

Re: Why does Flare use absolute paths instead of relative?

Post 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.
Shawn in Vancouver, Canada
Main tools used: Flare 11.x, InDesign, Google Docs, Lectora, Captivate.
Report bugs: https://www.madcapsoftware.com/feedback/bugs.aspx ▪ Feature requests: https://www.madcapsoftware.com/feedback ... quest.aspx[/i]
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Why does Flare use absolute paths instead of relative?

Post 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.
Margaret Hassall - Melbourne
sdcinvan
Propellus Maximus
Posts: 1260
Joined: Wed Aug 21, 2013 11:46 am
Location: Vancouver, Canada

Re: Why does Flare use absolute paths instead of relative?

Post 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. :shock:

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! :)
Shawn in Vancouver, Canada
Main tools used: Flare 11.x, InDesign, Google Docs, Lectora, Captivate.
Report bugs: https://www.madcapsoftware.com/feedback/bugs.aspx ▪ Feature requests: https://www.madcapsoftware.com/feedback ... quest.aspx[/i]
sdcinvan
Propellus Maximus
Posts: 1260
Joined: Wed Aug 21, 2013 11:46 am
Location: Vancouver, Canada

Re: Why does Flare use absolute paths instead of relative?

Post 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
Shawn in Vancouver, Canada
Main tools used: Flare 11.x, InDesign, Google Docs, Lectora, Captivate.
Report bugs: https://www.madcapsoftware.com/feedback/bugs.aspx ▪ Feature requests: https://www.madcapsoftware.com/feedback ... quest.aspx[/i]
sdcinvan
Propellus Maximus
Posts: 1260
Joined: Wed Aug 21, 2013 11:46 am
Location: Vancouver, Canada

Re: Why does Flare use absolute paths instead of relative?

Post 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.
Shawn in Vancouver, Canada
Main tools used: Flare 11.x, InDesign, Google Docs, Lectora, Captivate.
Report bugs: https://www.madcapsoftware.com/feedback/bugs.aspx ▪ Feature requests: https://www.madcapsoftware.com/feedback ... quest.aspx[/i]
Post Reply