Copy link to clipboard
Copied
We have RH8 and have noticed that in compiled webhelp, a few random topics are missing their style sheet. In the editor the style sheet is attached and in Preview the topic appears as it should.
The stylesheet is in the output folder where it should be. There are no extra copies of the stylesheet hiding in folders that could be causing problems.
We have even checked the box on the compiling box for "Additional Options" - apply stylesheet to all topics. It does NOT fix the problem.
In the Topic List I selected all topics, and reselected the custom stylesheet. This did NOT fix the problem.
To fix the issue we have to 1) apply the default.css stylesheet, then 2) apply the custom stylesheet to the specific topic. This fixes the issue.
When we look at the code for the topic the change we see is this:
BAD (no style sheet appearing in compiled webhelp):
<link rel="StyleSheet" href="../../LifeSupport.css" type="text/css" />
GOOD (stylesheet appears in compiled webhelp):
<link rel="StyleSheet" href="..\..\LifeSupport.css" type="text/css" />
The difference is the direction of the \
Why would this matter and how can we proactively find and fix these topics?
Thank you so much for your help & advice!
Copy link to clipboard
Copied
Try one or all of the following:
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
It's a nasty RoboHelp habit. You can also try a find and replace operation on your sourece files and/or output files. (Backup first!)
Change all occurances of ..\ by ../. (Unless you use this text in your topics, which I doubt.)
Greet,
Willam
Copy link to clipboard
Copied
Willam, thanks for answering!
I'm terrified of changing ..\ to ../ with Search/Replace since when RH decided to apply the style sheet...the resulting code was ..\ - that is what worked! So if I change it back will I put the problem back in?
We see ../ and ..\ for the stylesheet paths all the time - with no rhyme or reason. Two topics created in RH8, back to back, will have different slash marks for the stylesheet...??? crazy!
The "problem" topics are not new ones. nor are they ones that were recently edited. They are existing topics that have been fine until now.
I'm hoping for a 'global solution' but am beginning to think that its a file-by-file fix that is "just life". Agreed?
Copy link to clipboard
Copied
I don't know why RH sometimes does it wrong, but it needs to be ../. Most browsers are forgiving so it mostly works either way.
Try running the validation tool (File > W3C Compliance > Validate) for the files with ..\ in a relative path. It will point out that you need to use a slash instead of a backslash. Also, look at the way a URL is made: http://wwwadobe.com, it allways uses slashes. The relative path in your topics is just another way of creating an URL.
Find and replace is potentially dangerous, since you can wreck a project in mere seconds. That's why you should allways make a backup before doing it.
The manual solutions would be to manually correct all paths in your topics. A tool lik dnGrep can do it for you in a matter of seconds. You will need to test it thoroughly to make sure it did what you want.
Greet,
Willam
Copy link to clipboard
Copied
Using Edit > Find and Replace in Files, you should be able to
Find: href="..\..\LifeSupport.css"
Replace: href="../../LifeSupport.css"
Of course, if you're using source control, you should probably Check Out all the files in the project, since you won't know which ones will need editing in advance and doing them one at a time will be inefficient.
Good luck,
Leon
Copy link to clipboard
Copied
Couldn't you just select all topics in the Topics tab, apply the default.css, then the correct css to fix this for all topics?
Copy link to clipboard
Copied
What a simple...and probably perfect solution...! I will give that a try and thank you! I can't believe I didn't think of that. Talk about the forest and damn trees...!!!
![]()
Copy link to clipboard
Copied
I hope it works. ![]()
Copy link to clipboard
Copied
Thanks for chiming in Peter!
Your answer appears to be what we are doing for each discovered Topic - apply another style sheet, then reapply our custom one, save and all is good. And this does fix it...IF I know what topic is an issue.
What I'm hoping for is either a way to find all the lurking problems and fix them before someone complains...or a global way to force my .css onto all Topics and override the problem. The global tools in RH8 don't appear to overcome this.
I'm beginning to think that this might be a quirk I have to live with and fix as I encounter them...agree?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more