12 Replies Latest reply on Oct 20, 2010 6:16 AM by Linux Rules

    Webhelp output files picking wrong slash for filepaths

    panchamee

      I use RoboHelp 7.0.2 to generate WebHelp.

       

      We are newly adding support for Linux.

      To support the usage of slash (in filepaths) in Linux supported browsers, I changed all '\' to '/' in multiple source files as well in the CSS file.

       

      When I view the WebHelp on a Linux browser, I see link breaks.

      Upon analysis, I found out that the files in whdata, whgdata & whxdata are still using '\', which is the cause of the link breaks.

       

      As a temporary solution for a Beta release, I manually (using a search & replace tool) changed '\' to '/' in files that are present in whdata, whgdata & whxdata.

      Every time I generate the Webhelp, the problem will reoccur.

       

      How do I resolve this?

       

      Thanks,

      PT

        • 1. Re: Webhelp output files picking wrong slash for filepaths
          Peter Grainge Adobe Community Professional (Moderator)

          I have asked a Linux user to look at this and he has kindly offered to run some tests later.

           


          See www.grainge.org for RoboHelp and Authoring tips

           

          @petergrainge

          • 2. Re: Webhelp output files picking wrong slash for filepaths
            Linux Rules Level 2

            Hello PT and Peter -

             

            I ran a few tests to see what  happens when opening an RH generated WebHelp project in Mandriva Linux  2010.1 using Firefox 3.6.10 as my default browser. Here is my set up,  sequence and finding.

             

            RH7 WebHelp running on Windows XP Professional.

            > I converted an RH X5 WebHelp project to RH7 WebHelp.

            > Project has over 500 topics, heavy with images and DHTML drop text.

            > I use "index.htm" as the default project page (not the default opening topic).

            > I generated to project twice, once without Java, once with Java.

            > Copied all generated folders and files to a flash drive.

             

            Linux: Mandriva 2010.1

            Browsers in Linux: Firefox and Chromium

            Procedure: open flash drive in Dolphin window explorer, navigate to generated project default file (index.htm), select and open in desired browser.

             

            RH7 (no Java applet) gen settings

            Conditional Build Expression: none
            Additional Options: W3C Compliant Topics

            Toolbars: Content, Index, Search, Glossary
            (enable) Show Navigation Pane
            (enable) Add Breadcrumbs

            (enable) Browse Sequence
            (enable) Enable Highlights
            (enable) Sync TOC

            No Java Applet: DHTML > Pure HTML

            Optimize Speed: Web Site

            (enable) Republish all

             

            Firefox in Linux result: no problems, full functionality

            Chromium in Linux: would not open any (local) generated project

             

            RH7 (with Java applet) gen settings

            Conditional Build Expression: none
            Additional Options: W3C Compliant Topics

            Toolbars: Content, Index, Search, Glossary
            (enable) Show Navigation Pane
            (enable) Add Breadcrumbs

            (enable) Browse Sequence
            (enable) Enable Highlights
            (enable) Sync TOC

            Java Applet: DHTML > Java Applet > Pure HTML

            Optimize Speed: Web Site

            (enable) Republish all

             

            Firefox in Linux result: no problems, full functionality

            Chromium in Linux: would not open any (local) generated project

             

            RH9 Beta - B171

            I also tested RH9 beta build 171 WebHelp as configured above for no Java: Firefox in Linux had no problems, full functionality.

             

            Question for PT: how are you setting up your Linux to  open the default project page? Are you opening the GENERATED project  default page or trying to open the project source files? Why are you  replacing the foreward-backward slash?

             

            If you are uploading to a Linux server, just copy the entire  generated project folders/files as-is and point your browser to the  default opening page file you named during generation.

             

            Regards,

            GEWB

            • 3. Re: Webhelp output files picking wrong slash for filepaths
              panchamee Level 1

              Hi GEWB,

               

              Here are some more details--

              Generate Webhelp output setup:

              Use lowercase filenames (recomm. for UNIX)

              Toolbar buttons: Content, Index, Search

              Navigation: Add breadcrumbs links

              Additional options: Enable Highlight Search results, Synchronize TOC automatically

              Navigation Pane preferred format: DHTML > Java Applet > Pure HTML

              Optimize speed for: Web site

               

              Q: how are you setting up your Linux to open the default project page?

              A: I use Linux only to launch the webehelp output.

               

              Q: Are you opening the GENERATED project default page or trying to open the project source files?

              A: I am trying to open the generated project default page. I copy the Webhelp folder to a Linux machine and launch the index.html page to see the output.

               

              Q: Why are you replacing the foreward-backward slash?

              A: In Linux '\' is not supported for hyperlinks/filepaths. Therefore I changed the backward slashes to forward slashes.

               

              The scenario:

              When the project files have filepath such as ../../doc/xyz/,

              • when I view in Windows (IE)- I can access the link
              • when I view in Linux (FF)- I see broken link with error message somewhat like "cannot find ..\..\doc\xyz\". (Note the changed usage of slash)

              This indicates that the generated files changes the forward slash to backward.

              • 4. Re: Webhelp output files picking wrong slash for filepaths
                perttime Level 1

                How do the file paths look in your generated help files, as raw HTML in Notepad for example?

                 

                - ToC files (whtdata0.htm etc.)

                - any topic files that have links

                • 5. Re: Webhelp output files picking wrong slash for filepaths
                  Peter Grainge Adobe Community Professional (Moderator)

                  Also bear in mind that in source files it is normal to see \ and for RoboHelp to convert it to / in the output. I wonder if the fact you are changing the source is messing with that process.

                   

                  I'll leave the other points to Linux Rules.

                   


                  See www.grainge.org for RoboHelp and Authoring tips

                   

                  @petergrainge

                  • 6. Re: Webhelp output files picking wrong slash for filepaths
                    Linux Rules Level 2

                    This bothered me all night...

                     

                    I need to construct a new project from scratch and use the functions that are causing you this problem. I do recall that X5 did create a similar or same problem and I had to make the same manual correction as you. The test project I used was from that version and I likely had made the correction (years ago) - I'm missing something. I haven't found my notes from then (six years ago) and the old forum threads were wiped by Adobe (I do recall posting a thread about this).

                     

                    I'll work on it later today.

                     

                    Regards,

                    GEWB

                    • 7. Re: Webhelp output files picking wrong slash for filepaths
                      perttime Level 1

                      In my "untampered" help projects, the output files seem to have the flashes correctly, like when the .hhc file says:

                      <param name="Local" value="qwert\asdfg.htm">

                       

                      the whtdata0.htm file points to:

                      "qwert/asdfg.htm"

                       

                      and links in topic files point to

                      <a href="../qwert/asdfg.htm">

                       

                      I see some back slashes in scrips that seem to be for Breadcrumbs, but I don't know how their syntax works.

                       

                       

                      Using RH 7.0.2

                      ---

                      (couldn't edit my earlier post)

                      • 8. Re: Webhelp output files picking wrong slash for filepaths
                        Linux Rules Level 2

                        PT -

                         

                        Thanks for this last post as now I think I understand.

                         

                        What you are seeing with those backslashes has nothing to do with Windows / Linux / *nix path statements - those are part of JavaScript. It was your example that provided the clue: in JavaScript, a string is started and stopped with either single or double quotes.

                         

                        In JavaScript, the backslash is used to insert apostrophes, new lines, quotes, and other special characters into a text string. If you do a global search and replace from \ to / then the JavaScript will break.

                         

                        Regards,

                        GEWB

                        • 9. Re: Webhelp output files picking wrong slash for filepaths
                          perttime Level 1

                          Linux Rules,

                           

                          I suspect you are confusing me with PT (panchamee)...

                           

                          ... but yes, I think a global serch/replace could well break something.

                           

                          Pertti

                          • 10. Re: Webhelp output files picking wrong slash for filepaths
                            Linux Rules Level 2

                            Ah, sorry, you're right - that's what happens when I'm up all night because the brain doesn't turn off, then getting up at 4:45 am to try and figure this out!

                             

                            However, I wonder if my previous post holds the answer.

                             

                            Regards,

                            GEWB

                            • 11. Re: Webhelp output files picking wrong slash for filepaths
                              Peter Grainge Adobe Community Professional (Moderator)

                              Gary, that is dedication way beyond the call of duty. I hope Panchamee appreciates what you have done.

                               


                              See www.grainge.org for RoboHelp and Authoring tips

                               

                              @petergrainge

                              • 12. Re: Webhelp output files picking wrong slash for filepaths
                                Linux Rules Level 2

                                Hello Peter -

                                 

                                Actually, it was fun. I just hope we found the correct answer - need Panchamee to respond. If the problem remains then it's time to build a new project. However, after today I will not be available until early November.

                                 

                                Regards,

                                GEWB