I am trying to get checkboxes to show up on a set of facets based on taxonomy terms and they are not showing up even when the Links with Checkboxes display option is selected.

When looking at the rendered CSS, I see the class "facetapi-checkbox" when I believe I should be seeing "facetapi-checkbox-processed" on the list items.

Any thoughts on this issue?

I am using Solr on a Windows development environment.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cpliakas’s picture

Status: Active » Postponed (maintainer needs more info)

Hi @Deadmoon13,

This is likely to be a Javascript issue somewhere, as I cannot replicate on a clean install od Drupal. If you are comfortable with javascript debugging tools I would see if there are any errors preventing script execution. I would also turn off aggregation if it is enabled to see if that does anything. If you are not comfortable debugging Javascript, then try disabling modules on a development environment to narrow down where the issue is coming from.

Thanks,
Chris

Naomi79’s picture

Issue summary: View changes

Hi! I think I'm having the same issue. Checkboxes are not showing up when facets blocks are added via Views module. The file facetapi.js is not loaded. Here is what I've done:

1) create a search index

2) create a new view based on this index

a) create page with filter criteria:
- Search: Fulltext search (exposed)
- Indexed Content: Item language (= Current user's language)
and contextual filters:
- Search: Fulltext search
-Indexed Content: Item language

b) add a facet block with these settings:
- Block name:None
- Search page path:Use current path
- Facet field:Poll category
- Hide block:No

3) Use context module to display the facet block and the result is:

<ul>
    <li class="leaf even first">
         <a href="/hspa/search/polls?f[0]=field_taxonomy_poll%3A51" class="facetapi-inactive">The disease (1)<span class="element-invisible"> Apply The disease filter </span></a>
    </li>
    <li class="leaf odd last">
        <a href="/hspa/search/polls?f[0]=field_taxonomy_poll%3A54" class="facetapi-inactive">Grade 1 (1)<span class="element-invisible"> Apply Grade 1 filter </span></a>
   </li>
</ul>

Please note that checkboxes show up when I use the context module to display facet api blocks directly, without using views (step 2b below). Unfortunately I don't know enough about Drupal to understand what's happening exactly. Any help is welcome.

Enabled module:
Search API 7.x-1.13
Facet API 7.x-1.5
Search facets 7.x-1.13
Search views 7.x-1.13

Thanks for sharing this amazing module.

EdoP’s picture

I had the same problem. The answer can be found here: https://www.drupal.org/node/1679974
In short: in the same screen where you set the widget, you also need to adjust the GLOBAL SETTINGS / Operator to "OR"
("AND filters are exclusive and narrow the result set. OR filters are inclusive and widen the result set.")

msjothiraj’s picture

FileSize
106.92 KB
106.17 KB
24.03 KB

I'm also facing the same issue. Check box is not shown, even the setting are correct(Display Widge t-> Links with checkboxes).

Anonymous’s picture

Do you have apachesolr_autocomplete enabled as well? Seems to be a conflict with jquery.autocomplete.js when the checkbox option is enabled.

Ahmad Abbad’s picture

Make sure to select AND Operator from Global settings

aaronsssp’s picture

#5 WORKS FINE !! Thanks

Just disable Apache Solr autocomplete module (apachesolr_autocomplete)
GLOBAL SETTINGS "AND" / "OR" doesn't effect checkboxes

msjothiraj’s picture

FileSize
48.59 KB

Hi,
I have a Quiz which has 'Categorized random questions' option enabled where I have added two custom fields('Section' and 'Difficulty level') in 'Multiple choice Question' content type as field type 'term reference' which has 'hierarchical select' as a widget type for both of the fields...

My vocabulary is

Quantitative Ability(QA)
-Numbers
-Calculation

Vocabulary 2 : 'Difficulty Level'

-Very Easy
-Easy
-Average
-DIfficult
-Very Difficult

Now i wants fetch only 10 questions from numbers category easy level..

Thank you for advance..

Screenshot

Anonymous’s picture

@msjothiraj Think you have the wrong module. Try Quiz module?

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.