Gravatar for

Question by jnein, Jun 15, 2016 8:32 AM

Search View does not show anything

I have added a SearchView to a Sitecore MVC site that uses Coveo for Sitecore 4. It was working at first but I left editing that page and started working on other pages then I came back and nothing would show up on the page. I see the Coveo loading image when the page is loading, I see the divs that should be getting populated, and I even see the call being made successfully to the rest services, but nothing actually gets rendered on the page in editor or preview mode. Does anybody have an idea how I could debug this? I have checked the javascript console and there are no errors and I've tried manually calling init() through the console but still nothing happens.

Thanks, John

Gravatar for

Comment by Sébastien Belzile, Jun 15, 2016 10:28 AM

Any errors in your logs?

Gravatar for

Comment by Jean-François L'Heureux, Jun 15, 2016 10:59 AM

Is it possible that your "Coveo Search View Resources" component is declared after your "Coveo Search View" component in the item's presentation details? It should be declared before.

Also, it is possible that you unchecked the "Auto Trigger Query" option on your Coveo Search View component?

A Coveo Search View component with a bad configuration should display an error message instead of being displayed in edit mode.

Gravatar for

Comment by jnein, Jun 16, 2016 9:33 AM

There is nothing in the Coveo logs. I have made sure that the Coveo Search View Resources is defined above the Search View and that there is only one of them declared on the page. I have made sure that the Auto Trigger Query is selected on the component. No errors are being shown, just completely blank where the component should be. I wrapped the component with a header and footer in edit view to confirm it's actually in the correct spot and it is, it just doesn't display anything.

Let me know if you need any additional information.

Thank you, John

1 Reply
Gravatar for

Answer by jnein, Jun 16, 2016 10:29 AM

I found the issue. There was a custom search box that I am using that is just a simple input box. That apparently had search as a class and ID which made the javascript latch onto that instead of the Search View. After removing it I do see everything properly showing up now.

Gravatar for

Comment by Jean-François L'Heureux, Jun 16, 2016 10:38 AM

Good catch John!

Ask a question