0

Good day,

I have a issue when my page is loading. The normal behaviour is that all javascripts files are loaded in the request url: http://example.com/Coveo/Hive/js/Searchbox.min.js .

But sometimes the javascript load in the request url: http://example.com/Searchbox.min.js , so here i have the issue because that resource in the path doesn´t exist.

I don´t find a solution, does anyone know about this?

thank you in advance.

3
  • How do you render that link? Apr 11 '19 at 5:39
  • Which Coveo for Sitecore version? Are you using the Coveo for Sitecore Hive framework or the legacy (WebForms or MVC-tagged) components? Is lazy loading enabled? Apr 11 '19 at 11:30
  • Hi @flguillemette Sitecore version: 8.2.170728 Coveo for Sitecore is the version: 4.1.184.19 I am using the Coveo for Sitecore Hive Framework. Lazy loading is enable. Apr 11 '19 at 13:48
1

This issue related to lazy loading, and the way the Coveo JavaScript Search Framework detects what is the path to use to lazy load its components.

This issue was fixed in 4.1.414 by adding class="coveo-script" directly on the script that loads the Coveo JavaScript Search Framework.

In the Views/Coveo Hive/Resources/Coveo Search Resources.cshtml file, the line

<script type="text/javascript" src='@(Html.Coveo().IsEditingInPageEditor() ? Model.Properties.CoveoSearchUiPath + "/js/CoveoJsSearch.Lazy.js" : Model.Properties.CoveoSearchUiPath + "/js/CoveoJsSearch.Lazy.min.js")'></script>

should now read:

<script class="coveo-script" type="text/javascript" src='@(Html.Coveo().IsEditingInPageEditor() ? Model.Properties.CoveoSearchUiPath + "/js/CoveoJsSearch.Lazy.js" : Model.Properties.CoveoSearchUiPath + "/js/CoveoJsSearch.Lazy.min.js")'></script>

Adding this tag will make it so the lazy loading path is properly detected, and will properly load the components.

I would recommend upgrading to at least 4.1.414 since it contains the fix that you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.