9 Replies Latest reply: Oct 15, 2012 6:44 AM by tagemoff RSS

    Non-local searches return "null" results

    bluejays47 Community Member

      I'm creating a Merged help output using AIR Browser Based Help. Said output currently has one major flaw: null search results when viewed over a network.

       

      Now, I have read through the thread on this forum about people who initially got a "null" search result when searching a local project, but with the search subsequently working, and indeed that behavior is what I was initially seeing. That is, on my local copy of the project, my first search would return "null," and then things would work normally. However, when other users accessed my local project over our network, they never got anything other than "null" results. (Quick aside for relevant information: output was from 64-bit RH9, testing is on FIrefox 13 and I.E. 9) If I move my local copy onto the network, I am no longer successful in searching.

       

      I have performed the suggested fix on the whfhost.js file, and while it fixed the problem locally-- I no longer see "null" results-- the problem persists for non-local access. Does anyone have any suggestions on how to fix this?

       

      Thanks!

        • 1. Re: Non-local searches return "null" results
          bluejays47 Community Member

          Oh, and I forgot to mention: we get a slightly different behavior between Firefox and I.E. Firefox will always return "null," whereas I.E. will occasionally just not return anything. Relevant? Maybe.

          • 2. Re: Non-local searches return "null" results
            Peter Grainge CommunityMVP

            Network is not sufficient. It has to be on a web server, not just any server.

             


            See www.grainge.org for RoboHelp and Authoring tips

             

             

            @petergrainge

            • 3. Re: Non-local searches return "null" results
              bluejays47 Community Member

              Ah, I understand the ambiguity in my initial post, but the project is on a webserver. Not just "the network." Sorry!

              • 4. Re: Non-local searches return "null" results
                Peter Grainge CommunityMVP

                You have to make the change every time you generate and you have to make it in each project in the merge. Have you done that?

                 

                How are you getting the output from your local disk to the webserver?

                 


                See www.grainge.org for RoboHelp and Authoring tips

                 

                 

                @petergrainge

                • 5. Re: Non-local searches return "null" results
                  bluejays47 Community Member

                  Okay, the problem seems to have solved itself. By which, I mean that apparently everyone needed to clear their caches after the JS file was changed. After we did that, it started to work.

                   

                  Now, I've only changed the JS file for the parent project, not the child projects, so I'll definitely be looking at that. However, given that the problem seems to be fixed (and fingers crossed), I am definitely satisfied!

                  • 6. Re: Non-local searches return "null" results
                    Peter Grainge CommunityMVP

                    If it ain't broke, don't fix it.

                     


                    See www.grainge.org for RoboHelp and Authoring tips

                     

                     

                    @petergrainge

                    • 7. Re: Non-local searches return "null" results
                      tagemoff Community Member

                      I thought I would reply to this thread rather than create a new one, as I am in a similar situation.

                      Initial search was returning "null" with proper results appearing in subsequent searches. I modified the whfhost.js file as prescribed and after pushing the new files to the web server, the search now gets caught in a loop. No results will return (not even "null"), and it will keep searching indefinitely.

                       

                      What options do I have to fix the search at this point?

                      • 8. Re: Non-local searches return "null" results
                        Peter Grainge CommunityMVP

                        For the benefit of anyone else, this is the solution that was provided by Adobe.

                         

                        ****************************************

                         

                        Open the generated output folder and open whfhost.js file in the notepad application. Search for the following strings in the file. you need to replace this function

                        function Query()
                        {
                          gbAIRSearchString  = goOdinHunter.strQuery;
                        g_CurPage = 1;
                        context = new HuginContext();
                          context.reset();
                        context.push( goOdinHunter.query, goOdinHunter,
                          processHunterResult, null );
                          context.resume();
                        }


                        With this new function

                        function isValidType(obj)
                        {
                        return ( (typeof(obj)!='undefined')&&(obj!=null) );
                        }

                        function Query()
                        {
                          gbAIRSearchString  = goOdinHunter.strQuery;
                        g_CurPage = 1;
                        if (isValidType(context) && isValidType(context.aTasks))
                        {
                          while(context.aTasks.length>0)
                          {
                          context.resume();
                        }
                        }
                        context = new HuginContext();
                          context.reset();
                        context.push( goOdinHunter.query, goOdinHunter,
                          processHunterResult, null );
                          context.resume();
                        }


                        And try running the output and see if you stilll face the null search result problem

                        If this problem is fixed, then you can go to the C:\Program Files\Adobe\Adobe RoboHelp 8\RoboHTML\WebHelp5Ext\template_stock folder location, and make the similar changes in the whfhost.js file located in this folder.

                         

                        ****************************************

                         

                        It has worked for others so I would first check carefully that you have made the modification correctly.

                         

                        If you reverse the change, are you back to square one and get a null result first time?

                         

                        The modification was for RoboHelp 8 or 9. You haven't said what version you are using.

                         

                        Does it fail with all browsers?

                         


                        See www.grainge.org for RoboHelp and Authoring tips

                         

                         

                        @petergrainge

                        • 9. Re: Non-local searches return "null" results
                          tagemoff Community Member

                          Hello --

                           

                          I am using RoboHelp 9. After reversing the change I would get the null result again. I am going to reinstall before doing anything else. I know that the search was working properly before as we received some customer feedback on it -- the only thing that has changed with RoboHelp since then is an update that was installed a few weeks ago. That update may have mucked things up.

                           

                          I'll report back if I have any luck with the reinstall.