6

We have implemented a global Coveo search box, in our global header on our site that drives to our search page. This appears on our search page as well. Both the search box on the search page and the global search box use this for suggested results:

https://developers.coveo.com/display/public/SitecoreV4/Provide+Result+Suggestions

However, on our search page, we now get a JavaScript error on the page. Uncaught TypeError: Cannot read property 'addEventListener' of null(…)

If I remove the Coveo Omnibox Result List View from the global search box on the page it works fine again.

5

Well, you just found a new bug in Coveo for Sitecore 4.0.450!

It is caused by a new fix that was introduced in the October version. It looks for an input in all .CoveoSearchboxes to bind an event when the CoveoForSitecoreOmniboxResultList component is added. However, the input is not yet loaded, because the Search page loads after the CoveoForSitecoreOmniboxResultList component.

I have managed to come up with a quick workaround that will fix your problem:

Add the following input tag like this in your SearchView.cshtml file:

<div class="CoveoSearchbox CoveoSearchPageSearchbox" ... >
    <input style="display:none"></input> <!-- This line here -->
</div>

The bug will be fixed in the next version :)

| improve this answer | |

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.