6 Replies Latest reply on Apr 28, 2012 1:59 PM by perttime

    filesystem version looks good, web-served not so much


      I have created a WebHelp project from my FrameMaker book. When I click View in RoboHelp, RoboHelp opens it in my browser as a file, and it looks like I want it to look. I can also exit RoboHelp and open the file directly from my browser.


      But when I copy the WebHelp folder to my web server and try to view it through http, none of my styles appear.


      Here's what it looks like from the filesystem...



      ...and here's what it looks like over http...



      If I manually edit RHMappingStyles.css and turn the text to, say, green, it works in the file system version, but not in the http version.


      I've also tried editing the title.css (the page is title.htm).  Yet, if I edit text in title.htm, it does show up, so I know I've found the correct files for both versions.


      What do I need to do to get my styles applied to the file when deployed to a web server?





        • 1. Re: filesystem version looks good, web-served not so much
          Captiv8r Adobe Community Professional & MVP

          Hi there


          I notice you are using LocalHost. That's sort of a web server on your own local C drive no?


          Have you tested by publishing to the actual server that will be used? Or is LocalHost where everyone will be accessing it from?


          Cheers... Rick


          Helpful and Handy Links

          RoboHelp Wish Form/Bug Reporting Form

          Begin learning RoboHelp HTML 7, 8 or 9 within the day!

          Adobe Certified RoboHelp HTML Training

          SorcerStone Blog

          RoboHelp eBooks

          • 2. Re: filesystem version looks good, web-served not so much
            Jerry_F_at_RedSeal Level 1

            localhost is the web server running on my local machine. There's nothing "sort of" about the server, it's a full-blown industrial strength Apache web server, installed locally. I'm the only one who has access.


            Ultimately, the files will be deployed to the support pages of the corporate internet site, and I cannot deploy test files to that location.


            However, I have deployed them to the corporate intranet site that is remote from my local machine, with the same results---no style sheets via http.



            • 3. Re: filesystem version looks good, web-served not so much
              Jerry_F_at_RedSeal Level 1

              Okay, I've found the smoking gun, the question now is, how do I fix it?


              RoboHelp writes the following to every (?) .htm file...


              <link rel="stylesheet" href="../../default.css" type="text/css" />

              <link rel="stylesheet" href="..\..\rhstylemapping.css" type="text/css" />


              Note the \ separators in the path to rhstylemapping.css. The Apache server cannot handle those.  They need to be /. When I change them, the styles work.


              The styles that get changed when I map Frame styles to RoboHelp styles are written to rhstylemapping.css, which is the one with the path separator problem.


              However, the web page that is presented to the viewer displays its content in frames.  So the browser goes to WebHelp/usr_gde/index.htm, but the content for this particular page is in WebHelp/usr_gde/usr_gde/title.htm.  Both pages contain the above style sheet links.  As does every other page displayed in the content frame.


              So now the question is, how can I edit the template RoboHelp uses to generate rhstyhlemapping.css so that it never uses \ where my web server requires / ?





              • 4. Re: filesystem version looks good, web-served not so much
                Willam van Weelden Level 5



                You can't do that in the template. The following script will help: http://www.wvanweelden.eu/extendscript/correct_url_backslashes Run that every time before you generate to quickly correct all relative url's.





                • 5. Re: filesystem version looks good, web-served not so much
                  Jerry_F_at_RedSeal Level 1

                  Thanks.  Got your script, ran it, looks good.


                  If you don't mind, I have a couple of followup questions: 


                  1. Is there a way to get RoboHelp to automatically run the script every time I update?  Or will it always be a manual process,where I have to remember to a) update, b) run the script, then c) generate?


                  2. Regardless, I am going to have to run my own post-generation script in order to package up the WebHelp and JavaHelp files for delivery to their various destinations---ZIP bundle to the web administrator for deployment of the WebHelp files, .jar to the build process for embedded online help.  If the Correct_URL.jsx script cannot be automated within RoboHelp, I could add some processing to my packaging script that would search out every instance of href="..\..\ and change to href="../../ in every .htm file in the output.  Is there a technical reason why running the script manually within RoboHelp is the better choice?


                  Again, thanks for your help, and script.



                  • 6. Re: filesystem version looks good, web-served not so much
                    perttime Level 1

                    There shouldn't be any particular reason not to use a script, or something, for post-processing when you need to accomplish something that RoboHelp cannot cope with. As long as you know what you are doing, anyway.


                    A couple of years ago, Willam solved my propblem getting Right to Left oriented helps out of RoboHelp outputs, and we got a Final Builder 6 project to do the necessary changes (and a few other things while it was running).