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

Style sheet not attached in compiled webhelp but is in Editor

Guest
Sep 22, 2010 Sep 22, 2010

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!

1.3K
Translate
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 ,
Sep 23, 2010 Sep 23, 2010

Try one or all of the following:

  • Change it in the HTML View.
  • Apply another CSS, saving and then reverting to the correct one.
  • Try Republish All


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
Translate
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
LEGEND ,
Sep 23, 2010 Sep 23, 2010

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

Translate
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
Guest
Sep 23, 2010 Sep 23, 2010

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?

Translate
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
LEGEND ,
Sep 23, 2010 Sep 23, 2010

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

Translate
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
Advisor ,
Sep 23, 2010 Sep 23, 2010

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

Translate
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 ,
Sep 23, 2010 Sep 23, 2010

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?

Translate
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
Guest
Sep 23, 2010 Sep 23, 2010

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...!!!

Translate
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 ,
Sep 23, 2010 Sep 23, 2010
LATEST

I hope it works.

Translate
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
Guest
Sep 23, 2010 Sep 23, 2010

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?

Translate
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
Resources
RoboHelp Documentation
Download Adobe RoboHelp