4 Replies Latest reply on Apr 14, 2011 12:18 AM by Willam van Weelden

    whtopic.js error




      I currently am loading a webhelp project, when I attempt to view a topic, I receive and error:


      An error as occured in the script of this page.


      Line: 392
      Char: 15
      Error: Expected ')'
      Code: 0

      URL: file///C:/WP%20Product%20ISO/whtopic.js


      I opened up the whtopic.js and looked at line 392 and it is below in red.  I have no issues with compiling or anything, just cannot view a topic in Robohelp, and if that popup error comes up, I cannot close it unless I force close Robohelp all together, which is quite annoying, any help would be greatly appreciated.


      function autoSync(nSync)
      if(nSync==0) return;
      if(isInPopup()) return;
      if(Knowledge DatabaseutMostTopic()




      Message was edited by: nwhite9327

        • 1. Re: whtopic.js error
          Willam van Weelden Adobe Community Professional & MVP



          It looks like something went wrong in the file. Replace the incorrect line

               if(Knowledge DatabaseutMostTopic()





          For my understanding, you cannot open the specific topic in RoboHelp, or can't you open any topics in the output? If it's only the output, there's probably something messing with the whtopic.js file. Try creating a new project and check for the same error.


          If you have this problem inside RoboHelp, you may have imported an output topic instead of a source topic. That may require you to clean up.





          • 2. Re: whtopic.js error
            nwhite9327 Level 1

            Thanks for the reply,


            Output works fine.  It is just when I am within Roobhelp.  If I right click a topic > view, it will attempt to load the topic but with this popup.


            I did change the line 392 scripting as you suggested, and it resolved that line, but now other lines are throwing scripting errors.


            Hmm i think i know what caused this


            'FIND AND REPLACE ALL'...


            as I needed to remove the term 'ISO' and change with Knowledge Database..., that line got change as it had 'ISO' in the characters.


            is there anyways to recreate fresh on this or do i have to try and resolve all the scripting errors?


            I have about 32 projects, so I'm sure its this project as the other ones work fine.





            • 3. Re: whtopic.js error
              nwhite9327 Level 1

              Ok, that was indeed the issue, I looked at a working script and copied exact info as it should be and its not throwing errors anymore.  Thanks for all the help



              • 4. Re: whtopic.js error
                Willam van Weelden Adobe Community Professional & MVP

                Glad it's solved.


                You may want to look into User Defined Variables: Define a variable and use that instead of typing things like product name, company name, etc. If it ever changes, you just change the definition of the variable and your project is updated. That eliminates one call for find and replace.