Link behavior of snippets and images

This forum is for all Flare issues not related to any of the other categories.
Post Reply
kevinmcl
Sr. Propeller Head
Posts: 252
Joined: Mon Sep 11, 2006 10:58 am

Link behavior of snippets and images

Post by kevinmcl »

Flare 9 on Windows 7.

Why is it that I can select a topic file in Content Explorer, ask "View Links", and get a Link Viewer pane that tells me of other topics that link into the selected file, and of other topics, image files, and snippet files to which the current topic links....... yet if I want to know how many (and which) topics call an image or a snippet, Flare just says "no incoming links" and "no outgoing links".... when I know for a fact that a given snippet or image is used in several topics??

Is there a switch or a setting that I've overlooked?
"Search entire project for a mention of this file" ??

For bonus points, why is it that I can rearrange folders (say, adding new subfolders for purposes of organizing a growing project), and move topics and images to new locations, and instantly get a dialog from Flare telling me what links are affected and asking if I want to update them? But if I move a snippet, it just breaks, with no dialog... and if I'm not currently editing a topic that calls the snippet, it breaks SILENTLY?

What is the purpose of those design choices?
The snippet breakage seems to have been afflicting people (other than just me) since at least August of 2008.
http://forums.madcapsoftware.com/viewto ... =13&t=6804

Is there a workaround?

If I want to clean out my image files folder, and remove some outdated .PNGs that are no longer used, what is the approved method, within Flare, to discover that big-old-flowchart-x.png is, or is not, called by any topics in my project?

Similarly, what is the approved method, within Flare, of picking a snippet file and finding out if it's still used in any current project topic(s)?

Thanks,

- kevin
De gustibus non disputandum est
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Link behavior of snippets and images

Post by Nita Beck »

kevinmcl wrote:If I want to clean out my image files folder, and remove some outdated .PNGs that are no longer used, what is the approved method, within Flare, to discover that big-old-flowchart-x.png is, or is not, called by any topics in my project?

Similarly, what is the approved method, within Flare, of picking a snippet file and finding out if it's still used in any current project topic(s)?
(Sorry that I have time only to answer these two questions.)

You can add a report and tell Flare to find "Unused Images" and "Unused Snippets".
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
kevinmcl
Sr. Propeller Head
Posts: 252
Joined: Mon Sep 11, 2006 10:58 am

Re: Link behavior of snippets and images

Post by kevinmcl »

OK, that's great (thanks) for part of the problem... old, stray, un-tethered images (or snippets).

But the other part of the problem is to know, when an old image might still be used in a project somewhere... WHERE is it still used? Maybe it should be refreshed? Maybe the topic is as outdated as the image and should be scrapped or replaced.

Having the Link Viewer work would solve both those issues in real time. It's not like the metadata doesn't exist in the project.

It's enough of a bother when you are working on your own projects where you haven't revisited certain corners for a while.

But imagine if you are updating somebody else's project, that you don't know well. Somebody hands you a capture or a flowchart or some other piece of art that either updates one that already exists - but your donor doesn't know what the previous one was called... and neither do you - or adds a some new output or whatever. If you find some similarly named graphics, you could just run the Link Viewer on them, to see where they are used (or even if they are used). But that doesn't work. Link Viewer tells you nothing about where a graphic (or snippet) is used.

Instead, you have to go through all the topics, checking to see if any graphic files light up in Link Viewer. Kinda bass-ackwards for that purpose.

OR, how about if a snippet is outdated for some purposes, but still valid for others.
If the Link Viewer worked, it would immediately tell me all five topics where snippet XYZ is used, and I could re-work the ones where it was no longer appropriate. Or I could create a new version snippet and rename the old one so that both versions could co-exist... no... if I do that, it instantly breaks the links to ALL topics where the renamed snippet was called, but doesn't prompt to "Update links" and doesn't identify the newly-broken links. I'd have to remember them all, or hope that the error messages on Project Build will be informative.
De gustibus non disputandum est
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Link behavior of snippets and images

Post by Nita Beck »

Kevin, please don't think I blew off the first part of your post. I simply don't have time today. :( I wanted to at least answer the other questions, and my hope is that someone else will jump in here to help you out...
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Link behavior of snippets and images

Post by Msquared »

Well, I've learned something today. I didn't know about the "Unused Images" and "Unused Snippets" reports. Will be useful when I get some time for a tidy up . . . .

I'm not the expert that Nita was hoping would jump in and help you out, but if I want to find out where something is used, I run a global search against the all the XML files in the project (or just all the topic files, depending on what I'm looking for). Then if necessary, I can do a global replace to fix or change the references. Of course, it means that you need some idea of what the reference you are looking for is called, or some idea of a text string that is likely to be found close to the thing you are really looking for.

Flare does have a Find and Replace in Files search, which can be set to search the raw XML source, rather than just the document text, but I'm afraid I rarely use it. I tend to use Notepad++ which is very powerful and also free. I found Flare's Find and Replace in Files rather cumbersome in earlier versions of Flare. I think it may be a bit better now, but I'm used to Notepad++ so I stick with it for what it's good at.

I expect MadCap will fix the snippet update issue soon. Up until recently the occurrences of either Conditionals or Variables (I can't remember which) weren't updated if you changed the name, and that's now been fixed. Why not raise an enhancement request, as MadCap are very responsive to what their users want, and the more people that as for a feature, the higher up the priority list the feature will go.
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Link behavior of snippets and images

Post by Nita Beck »

Kevin, I'm mystified. On your behalf, I scrutinized some of my Flare projects and I just don't see the behavior you are describing.

I located an image that I know is used in a large number of topics. I right-clicked the image in the Content Explorer and selected View Links. In the Link Viewer, I could see all of those topics that call that image listed under "LInked From." In short, I can see exactly where the image is being used in the project.

I then located an image that earlier today ended up becoming no longer used, but I hadn't yet removed it from the project. When I asked to view its links, the Link Viewer showed me "no incoming links," as I expected.

I tested this for snippets as well, and Flare always seems to tell me the right information. I examined the links for a snippet that I know to be used in many topics. The Link Viewer showed me the list of topics under "Linked From". Then I attempted to move this snippet, and Flare immediately asked me if I wanted to updated links in those topics.

I assume you know what I'm about to write, but let me go on for the benefit of others following this thread. Sometimes, the database that Flare uses to keep track of dependencies gets corrupted. The remedy is (with Flare closed) to delete the project's Analyzer folder. Then, when you open the project again, Flare will create that folder anew, thereby rebuilding the dependencies database.

If you delete the Analyzer folder, does that seem to clear up the behavior you're seeing?

I cannot say that I've never seen Flare not ask me to update links if I attempt to move an image or snippet, but in my experience that is a rare circumstance.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Link behavior of snippets and images

Post by Msquared »

I did have a case just a couple of days ago, where I renamed a snippet, and although Flare appeared to ask me if I wanted to update the links, and although I'm sure I said "yes" (as you do), the snippet in the topic wasn't renamed.

However, I was trying to do the rename in a project that was bound to Perforce, so I could record a foolproof sequence to do this in the future (not one of Flare's best features, although in this case, it's a Perforce limitation as much as a Flare issue). Flare already has its hands full with the Perforce interaction, as I know only too well, it is possible that this was the root cause of the link to the snippet not being updated. Who knows? I shan't be trying to reproduce this one just out of interest to see if it happens again. Moves on Perforce files are no fun. :roll:
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
Post Reply