Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Article printed from: https://blog.jermdavis.dev/posts/2016/the-case-of-the-missing-coveo-facet-picker

The case of the missing Coveo facet picker

Published 18 April 2016
Updated 25 August 2016

Quick one this week. Mostly to try and save my own blushes, because the issue here was completely my fault. For the first time on a particular project I was trying to do some Coveo development work. I had created a page based on the default MVC templates they provide for search, but when I tried to add a Facet in Content Editor, I found myself staring at this:

Missing Picker

No picker for the field to facet on – so no way to make the Facet component work...

Over the course of a frustrating couple of hours I tried a load of tests to see if I could spot an issue:

Was Coveo working?

Diagnostics

Diagnostics said yes.

Any obvious config errors?

Config

Nope, nothing looks like an error here. But a subtle hint that I failed to spot.

Were there any Javascript errors in the client?

Script Console

Nope – nothing that seems relevant.

I disappeared off down a few rabbit holes at this point, wondering if the project had done something in its custom configuration that might have been breaking bits of the Sitecore UI. I spent a good hour bouncing between config files and Google, getting nowhere. But that finally lead me to looking at the HTML DOM around the missing control:

UI DOM

And suddenly the clouds lifted: The picker control is there – but it's expressed as a custom UI control: <coveoui:facetpicker/>. The custom control isn't being executed. I'd been assuming that because it looks like an ordinary dropdown list, it was just a standard UI control. But custom controls in the Sitecore UI need to be registered so that Sitecore knows what code to run to make them work. And when I fired up the ShowConfig.aspx page and tried searching for this control's definition I found nothing.

So checking the Coveo configuration include files I found:

Untitled

Cue me banging my head on the desk and feeling embarrassed.

I had forgotten to rename the Coveo UI config file, as specified in their instructions:

Instructions

Low and behold, following the instructions correctly and renaming the UI config file gave me back my picker:

Working

Hopefully leaving this out there for Google will make fixing this easier for anyone else who makes the same mistake...

↑ Back to top