Missing linked stylesheet file

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
wisefolly
Propeller Head
Posts: 68
Joined: Thu May 19, 2011 6:12 am

Missing linked stylesheet file

Post by wisefolly »

I copied a new table style to a project. Now, when I build, I receive "missing linked stylesheet file" errors. I've found that I can fix them by resetting the table style for each table. Is there a better way fix this issue?

Is there a way to prevent this from happening? I have to add this updated table style to several other projects and anticipate the same problem.

Thanks!
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Missing linked stylesheet file

Post by Nita Beck »

My guess would be that the broken link's relative path to the table stylesheet is slightly different from the good link's relative path to the table stylesheet. Sometimes (and I don't know why), Flare throws an extra "/.." into a relative path. I refer to this as Flare's being confused...

I suggest that you look at the code of several of the relative path links that are broken and compare them to a good relative path link. Then Flare's search and replace (in source code) feature to swap out every broken relative path with the good relative path.

CAUTION!!!! Before you attempt this, make a backup of your project!!!!!

p.s. I assumed that the broken links were in topics. But perhaps the broken link is in the table stylesheet itself? Is it linked to another stylesheet back in the project from which you copied it in?
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
wisefolly
Propeller Head
Posts: 68
Joined: Thu May 19, 2011 6:12 am

Re: Missing linked stylesheet file

Post by wisefolly »

Yep, it looks like the link h ref is different. One has "../../../" and an unbroken one has "../".

How can i tell if the table stylesheet is linked to another stylesheet from a different project? I did copy the table stylesheet from another project.

I've been reseting the table style in each topic to fix it.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Missing linked stylesheet file

Post by Nita Beck »

Now that I think of it, I might be unintentionally steering you wrong. I know that one can link stylesheets, but I'm not sure whether table stylesheets can be linked. They're just .css files, so I would think they could be.

In any case, look at the table stylesheet in the internal text editor, i.e., in its code. If it is linked to another stylesheet, (I think) you'll see an "import" line somewhere that is referencing another stylesheet. Here's what one of my stylesheets (not a table stylesheet, mind you) looks like under the hood.

Code: Select all

@import url('../../Resources/Stylesheets/OtherStylesheet.css');
If you do see the import line, it might be that you need to import that stylesheet as well, or it could be that the relative path isn't correct here, too.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Missing linked stylesheet file

Post by LTinker68 »

wisefolly wrote:I've been reseting the table style in each topic to fix it.
You can do a find-and-replace in Flare instead of going topic to topic.

As far as the table stylesheet, it could be that you copied it in fine, but if you also copied a table with content from a topic in one project to a topic in the new project and that table referenced that table stylesheet, then you may have inadvertently created the problem because the source topic may have been four folders deep, for example, but the destination topic is only one folder deep. So the table that was copied is pointing to a path up four folders and down one when it should only be going up one and down one. That seems like a more likely scenario to me.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
wisefolly
Propeller Head
Posts: 68
Joined: Thu May 19, 2011 6:12 am

Re: Missing linked stylesheet file

Post by wisefolly »

Nope, no import line.

I'll give the find and replace in source code a try. Are there any best practices to keep this from happening?

Thanks so much for the help!
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Missing linked stylesheet file

Post by Nita Beck »

I can't say what best practices there might be, especially given Lisa's description of the likely scenario that led to the faulty relative links. But I've seen Flare do this when I've been moving things around among folders and/or renaming folders in the Content Explorer. I can make some moves and/or rename some folders and everything will be fine. Then, suddenly, for some reason, Flare completely messes up a whole bunch of relative links to those renamed folders. I've seen it do some really squirrelly stuff in the code (like, for some reason, inserting the new relative path into the middle of the original relative path, rather than replacing the original relative path with the new relative path). So if I need to make some large scale moves and/or renames, I make a backup of my project first. After a big move/rename or two, I check for broken links. If everything looks good, I make another backup, and then I continue... repeating this to make sure that I catch right away any instances of Flare's "getting confused." Yeah, this is buggy as far as I'm concerned; I've seen it enough times that I don't completely trust Flare not to mess things up.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
anthonyjaycorman
Jr. Propeller Head
Posts: 6
Joined: Wed Apr 05, 2017 4:08 pm

Re: Missing linked stylesheet file

Post by anthonyjaycorman »

OK, encountered this problem building HTML5 output, and eliminated it by deleting two print-only topics: Appendix.htm and Welcome.htm. Neither topic was used in the HTML5 target TOC or, for that matter, *any* TOC. It makes no sense to me, but it worked.
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Missing linked stylesheet file

Post by NorthEast »

anthonyjaycorman wrote:OK, encountered this problem building HTML5 output, and eliminated it by deleting two print-only topics: Appendix.htm and Welcome.htm. Neither topic was used in the HTML5 target TOC or, for that matter, *any* TOC. It makes no sense to me, but it worked.
All files in the content folder are included in the HTML5 output, regardless of whether they're included in the TOC.

They have to be excluded using conditions, or the target option to only include linked files.
Post Reply