• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Image locations using absolute path instead of relative path (FM2022)

Enthusiast ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

Our product manuals are in self-contained folders, e.g.

Product Name

- Common Images

- Manual A

  - Content Documents

  - Images

- Manual B

  - Content Documents

  - Images

 

These are stored on the network. However, because the network is accessed via VPN (working remotely), it is very slow. To get around this, the whole folder is copied to the local pc and worked on, then the whole folder is copied back to the network. However, we find that any images inserted (by reference) are using the absolute path, e.g. when the folders are copied to the local pc, images point to the images on the network. When the folders are copied back to the network, any images inserted while working on the document locally (inserted by reference from the local "images" folder) are still pointing to the local images.

 

Is there a way to resolve this so FM uses the relative path, e.g. Images used in Manual A will use the relative path \images\ or ..\Common Images\, rather than the absolute path c:\Product Name\Manual A\Images\ or c:\Product Name\Common Images?

 

Views

361

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

correct answers 1 Correct answer

Enthusiast , Apr 04, 2024 Apr 04, 2024

@Bob_Niland 

quote

re: What happens in the case where the Page Layout and Reference Pages are imported from another document?

That (Import Formats) is typically only done as a live operation, and not automatically, and usually not often (only when the template changes). If the author navigates to the template file, abs or rel path, it will simply work.

I suppose it is possible to script this and have it run routinely, but in that case you'd need to consult with the script author.

I normally keep the templ

...

Votes

Translate

Translate
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

Are you always working remotely via VPN, or sometimes working "locally" on the enterprise network?

What does a fully qualified path to a typical imported asset look like on each?
I presume the VPN presents a transparent virtual directory to FM (or is there a CMS involved here too).

 

When importing, how done?

Type in relative path?
Navigate relative {..\ up only as far as necessary, then down}
Type in explicit relative path?

 

In general, avoiding directory roots [leading / or \] and avoiding server names [drive letters, network share IDs] is necessary to preserve directory-relative. Where that can't be done, using symlinks (shortcuts on Windows) can create paths that are absolute but look relative to FM.

Votes

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
Enthusiast ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

@Bob_Niland 

Are you always working remotely via VPN, or sometimes working "locally" on the enterprise network?

What does a fully qualified path to a typical imported asset look like on each?
I presume the VPN presents a transparent virtual directory to FM (or is there a CMS involved here too).

I always work remotely via VPN. Others in the organisation have a mixture - sometimes in the office (locally to the network), sometimes remotely connecting via VPN.

No CSM involved. Just a good ol' fashioned VPN connection to the corporate network (as a whole, not exclusively to FM).

 

When importing, how done?

Type in relative path?
Navigate relative {..\ up only as far as necessary, then down}
Type in explicit relative path?

 

I should probably have mentioned that we used Structured FM (not DITA), so images are inserted using an Image-type element, which brings up the same window as using File > Import > File . The option Import by Reference is always selected.

Votes

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
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

As long as Product Name and everything under it is on a single network volume and you copy the whole thing to a local PC, all of the images should resolve.

Votes

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
Enthusiast ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

@frameexpert  That's what I thought was supposed to happen, but it doesn't seem to be the case. When I copy the files back to the network and open them from the network location and check the file name in the Object Properties, it's referencing the image on my local drive. The same thing is happening for any images on the Reference Pages.

Votes

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
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

How are you copying the files? If you do File > Save As to another drive, it will make the references absolute to the original drive.

Votes

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
Enthusiast ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

The whole folder is copied back and forth - each file isn't opened and saved to the local/server location.

Votes

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
Enthusiast ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

@frameexpert 

A follow-up question. What happens in the case where the Page Layout and Reference Pages are imported from another document? How is the pathing resolved in those situations? Absolute or still relative?

Votes

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
Community Expert ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

Hi,

FrameMaker always uses relative paths, as long as you do not have to go up to the root directory.

When you copy a file from another FrameMaker file, FrameMaker will keep the path to the copied file. (I admit that I noticed that sometimes FrameMaker uses the path to other image files of the target FrameMaker file instead of the path of the copied image file.)

And I work via VPN from home and do the same as you: Copy everything to my local laptop and work from there and copy everything back to the server later. No CMS or someting like that. And I had not had your issues.

Best regards, Winfried

Votes

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
Community Expert ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

re: What happens in the case where the Page Layout and Reference Pages are imported from another document?

That (Import Formats) is typically only done as a live operation, and not automatically, and usually not often (only when the template changes). If the author navigates to the template file, abs or rel path, it will simply work.

I suppose it is possible to script this and have it run routinely, but in that case you'd need to consult with the script author.

I normally keep the template.fm file for a project in the same ./dir as the .book & .fm files, so not much nav is required to do a bulk re-import of formats.

Votes

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
Enthusiast ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

LATEST

@Bob_Niland 

quote

re: What happens in the case where the Page Layout and Reference Pages are imported from another document?

That (Import Formats) is typically only done as a live operation, and not automatically, and usually not often (only when the template changes). If the author navigates to the template file, abs or rel path, it will simply work.

I suppose it is possible to script this and have it run routinely, but in that case you'd need to consult with the script author.

I normally keep the template.fm file for a project in the same ./dir as the .book & .fm files, so not much nav is required to do a bulk re-import of formats.


By @Bob_Niland

I think you may have pointed out the cause of my 'issue'. Somewhere a Save As must have been used instead of just copying the files, resulting in the absolute paths being used. I'll need to investigate further because it's clearly caused by "user" error (someone in the team must have encountered an ID10T error 🤭)

Votes

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