10 Replies Latest reply on Jul 21, 2017 6:30 AM by Peter Grainge

    Search not displaying results in IE11 if built from RH2017

    ChickAD

      My team are having a problem that some RH2015 projects that behaved perfectly in IE11 are now causing a problem if rebuilt in RH2017. The search panel in the WebHelp no longer displays results or any evidence of performing a search. The search works when viewed in Chrome and will also work in IE11 if you press F12 and select compatibility mode 10. Building out to HTML5 format, as a test, also results in a working help in IE11. So, the issue seems to be specifically with the WebHelp format.

       

      The problem seemed similar to a search problem affecting RH11 that was covered on this forum and required a patch to the whutils.js and whver.js files. Indeed, we quickly found that we can resolve the problem by taking the whutils.js produced by RH2015 and dropping it into the RH2017 WebHelp output folder to overwrite the generated file. The help then appears to behave perfectly on IE11 (and other browsers).

       

      A comparison of the whutils.js files from both RoboHelp versions shows that they are not identical and that additional code has been added in 2017. The help files received minimal editing before being rebuilt as WebHelp and no 2017-specific features were added, so this may be why we are getting away with using the 2015 file. However, as I don't know what the new code is doing, I'm uncomfortable about using the RH2015 file as a fix.

       

      Can anyone on the forum or from the Adobe team tell me if this problem is already known or if there is a patch for the file: we did search on the forum and bug report site but saw nothing obvious? The machine on which we performed the build was new and had a clean install of Technical Communications Suite 2017, and we have also confirmed it is fully up-to-date with software updates.

       

      Am I right in assuming that, when building WebHelp, RoboHelp fetches the whutils.js file from <RHnstallFolder>\RoboHTML\WebHelp5Ext\template_stock and that any permanent patch would need to be applied in that folder?

       

      Thanks in advance for any help you can offer,

      Charles Addison

        • 1. Re: Search not displaying results in IE11 if built from RH2017
          Jeff_Coatsworth Adobe Community Professional & MVP

          Yup, that's exactly where the generate process fetches it's source files - can you do a compare of the RH2015 & RH2017 versions and show the differences? That may give gurus like Willam a lead on what's happening...

          • 2. Re: Search not displaying results in IE11 if built from RH2017
            ChickAD Level 1

            Ok, I'm not sure how well this is going to work. I had to make a PNG file out of the content from the left and right pane of the comparison tool.

            whutils file Compare.png

            • 3. Re: Search not displaying results in IE11 if built from RH2017
              Peter Grainge Adobe Community Professional (Moderator)

              The expanded image is also illegible.

               


              See www.grainge.org for RoboHelp and Authoring information

               

               

              @petergrainge

              • 4. Re: Search not displaying results in IE11 if built from RH2017
                erika-runninggirl

                Hi,

                 

                I work with Charles so here I will try to show the differences again:

                Added to the 2017 version - there is no corresponding section in the 2015 version:

                /* sym.js
                */

                if(typeof String.prototype.trim !== 'function') {
                  String.prototype.trim = function() {
                    return this.replace(/^\s+|\s+$/g, '');
                  }
                }

                if (!Array.prototype.indexOf) {
                  Array.prototype.indexOf = function (elem, startFrom) {
                    var startFrom = startFrom || 0;
                    if (startFrom > this.length) return -1;

                    for (var i = 0; i < this.length; i++) {
                      if (this[i] == elem && startFrom <= i) {
                        return i;
                      } else if (this[i] == elem && startFrom > i) {
                        return -1;
                      }
                    }
                    return -1;
                  }
                }

                /* whutils.js
                */

                 

                This function has also been added to 2017:

                function getFilePath(url) {
                  var index;
                  if (url == null) {
                    url = decodeURI(document.location.href);
                  }
                  index = url.indexOf('?');
                  if (index !== -1) {
                    url = url.substring(0, index);
                  }
                  index = url.indexOf('#');
                  if (index !== -1) {
                    url = url.substring(0, index);
                  }
                  return url;
                }

                function getFileName(url) {
                  var fileName, filePath, idx;
                  filePath = getFilePath(url);
                  idx = filePath.lastIndexOf('/');
                  fileName = idx !== -1 ? filePath.substring(idx + 1) : filePath;
                  return fileName || '';
                }

                function getFileExtention(url) {
                  var ext, fileName, idx;
                  fileName = getFileName(url);
                  idx = fileName != null ? fileName.lastIndexOf('.') : void 0;
                  if (idx !== -1) {
                    ext = fileName.substring(idx);
                  }
                  return ext || '';
                }

                function scheme(url) {
                  var index, scheme;
                  index = url.indexOf(':');
                  if (index !== -1) {
                    scheme = url.substring(0, index + 1).toLowerCase().trim();
                  }
                  return scheme;
                }

                function isRelativeUrl(url) {
                  return !scheme(url) && url.trim().indexOf('/') && url.trim().indexOf("\\");
                }

                 

                This function has also been added to 2017:

                function isValidHelpTopicExtension(url) {

                  var allowedExtsInFrame = ['.htm', '.html'];

                  var ext = getFileExtention(url).toLowerCase();

                  return allowedExtsInFrame.indexOf(ext) !== -1;

                }

                 

                This function has changed - 2017 version:

                function IsValidInternalTopicURL(urlName)
                {
                  //Only Relative Urls are allowed
                if(!isRelativeUrl(urlName))
                  return false;

                  //Encoded characters are not allowed
                  if(urlName.indexOf("&#") != -1) {
                    return false;
                  }

                  //File path can't start with "//" or "\\" characters
                  if(urlName.indexOf("//")  == 0 || urlName.indexOf("\\\\")  == 0) {
                    return false;
                  }

                  //Only Canonical Paths are allowed
                  if(urlName.indexOf("..")  != -1 || urlName.indexOf(".")  == 0) {
                    return false;
                  }

                  //Help System allows specific extensions in topic path
                  if(!isValidHelpTopicExtension(urlName)) {
                    return false;
                  }

                  //Check for Illegal characters in help topic path
                  if(!IsValidTopicURL(urlName)) {
                    return false;
                  }
                 
                return true;
                }

                 

                2015 version:

                function IsValidInternalTopicURL(urlName)

                {

                if(urlName.indexOf(":") != -1 || urlName.indexOf("//")  != -1 || urlName.indexOf("&#")  != -1 || (!IsValidTopicURL(urlName)))

                  return false;

                 

                return true;

                 

                }

                 

                 

                 

                 

                Hope that helps - a fix would be most appreciated

                Erika

                • 5. Re: Search not displaying results in IE11 if built from RH2017
                  Peter Grainge Adobe Community Professional (Moderator)

                  Erika

                   

                  I don't think I have seen anyone else report this with RoboHelp 2017.

                   

                  The first two things I would do are:

                   

                  1] See if you get the same problem with the sample projects. Click Open on the RoboHelp Starter page and then click Samples in the ribbon on the left.

                   

                  2] Generate the output to a new folder and make sure it is on the same drive as the project.

                   


                  See www.grainge.org for RoboHelp and Authoring information

                   

                   

                  @petergrainge

                  • 6. Re: Search not displaying results in IE11 if built from RH2017
                    erika-runninggirl Level 1

                    Hi,

                     

                    Right Robohelp will not let me open the two sample projects - I get an error message that it cannot open the database, so I need to talk to my IT guy and see if he can fix them so I can open them.

                    However I did open a new project, create a couple of topics and then generated that and put it on the same test server.

                     

                    I do have the same issues, ie:

                    • When opened locally the search works fine on all 3 browsers
                    • When opened accross the network ie with a url instead of a mapped file the search does not work on IE11, it does work on FireFox and Chrome

                     

                    So more ideas please

                    Erika

                    • 7. Re: Search not displaying results in IE11 if built from RH2017
                      Peter Grainge Adobe Community Professional (Moderator)

                      Could you send me the output that does not work on your test server? I will

                      upload it to my server and see if I get the same result?

                       

                      Perhaps also send this new project so that I can generate another output?

                       

                      See the Contact page on my site and send via WeTransfer or similar.

                      • 8. Re: Search not displaying results in IE11 if built from RH2017
                        Peter Grainge Adobe Community Professional (Moderator)

                        I have tested your output and it is working fine with IE11 on my server. I have emailed you a link so that you can see it for yourself.

                         


                        See www.grainge.org for RoboHelp and Authoring information

                         

                         

                        @petergrainge

                        • 9. Re: Search not displaying results in IE11 if built from RH2017
                          ChickAD Level 1

                          Thanks Peter for your help and, as a result of you demonstrating it worked on your site, we think we have resolved the problem and explained the weird behaviour we were getting.

                           

                          Firstly, there is not a RoboHelp 2017 problem: the problem was caused by our IT department who unknown to us had pushed out a group wide IE11 setting that affected all intranet users.Display intranet sites in Compatibility view (in Tools) was switched on by default. This would not have been a problem if they had not also decided, for some strange reason, to set the default to IE5!!! To be honest, I'm surprised our help was the onlything that broke.

                           

                          Thank you for supporting Erika while I was off ill. I'll mark this question as answered.

                          • 10. Re: Search not displaying results in IE11 if built from RH2017
                            Peter Grainge Adobe Community Professional (Moderator)

                            Glad the problem is sorted and RoboHelp is off the hook.

                             

                            I've known Erika many years via the forum so pleased to help.

                             


                            See www.grainge.org for RoboHelp and Authoring information

                             

                             

                            @petergrainge