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:


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.

1 Answer 1


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 -->

The bug will be fixed in the next version :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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