Gravatar for

Question by Ben, Aug 11, 2015 9:08 AM

Unable to Collapse Hierarchical Facet

I am receiving an error when I try to collapse or expand hierarchical facets using the following:


It works when using it with '.CoveoFacet'

Here's the error:

Uncaught TypeError: Cannot read property 'hide' of undefined
    at n.collapseFacet (http://sitename/Coveo/js/CoveoJsSearch.WithDependencies.min.js:43:17051)
    at Function.i.dispatchMethodCallOnBoundComponent (http://sitename/Coveo/js/CoveoJsSearch.WithDependencies.min.js:38:1525)
    at Function.i.dispatchNamedMethodCallOrComponentCreation (http://sitename/Coveo/js/CoveoJsSearch.WithDependencies.min.js:38:1921)
    at HTMLDivElement.<anonymous> (http://sitename/Coveo/js/CoveoJsSearch.WithDependencies.min.js:38:2812)
    at Function.jQuery.extend.each (http://sitename/Coveo/js/CoveoJsSearch.WithDependencies.js:1009:23)
    at jQuery.fn.jQuery.each (http://sitename/Coveo/js/CoveoJsSearch.WithDependencies.js:631:17)
    at $.fn.coveo (http://sitename/Coveo/js/CoveoJsSearch.WithDependencies.min.js:38:2732)
    at <anonymous>:2:30
    at Object.InjectedScript._evaluateOn (<anonymous>:905:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:838:34)


Object {lib: "0.9.1146.25", product: "", supportedApiVersion: 2}
1 Reply
Gravatar for

Answer by Ben, Aug 11, 2015 9:36 AM

The 'Enable Collapse Button' option was unchecked in Sitecore for one of the facets. After verifying that all facets had the option checked, there's no longer an error. As a suggestion, the commands to collapse or expand facets should ignore facets which don't have collapse enabled, instead of breaking and stopping any facets from reacting to the command.

Ask a question