I've found that a facet group that becomes empty (because there isn't any content on page that requires it) won't repopulate on ajax refresh when it should be displayed.
This issue exists under the following conditions…
To reproduce:
- Create two facets groups based on two separate vocabularies
- Vocabulary a
- Vocabulary b
- Create two nodes:
- Node 1 contains a term from vocabulary a
- Node 2 contains a term from vocabulary b
- Display nodes via a Views 'page display'
- Select facet from vocabulary a
- Observe
- Deselect facet from vocabulary a
- Observe
Expected behaviour:
- When the facet is deselected the facets should be displayed in their initial state.
Actual behaviour:
- When the facet is deselected the second facet block is left empty.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | ajax_facets-empty_facet_group_wont_repopulate-2567729-6-d7.patch | 712 bytes | lukus |
Comments
Comment #2
lukusComment #3
lukusComment #4
okin commentedI'm facing the same issue.
When a facet get empty the content wrapper loose its ID attribute so it's not refresh anymore even if its content is in the ajax response.
I added an ID in empty_behavior_ajax_facets.inc on line 57 and it works fine.
$wrapper = '<div class="' . $class1 . ' facetapi-facet-' . $class2 . '" id="facetapi-facet-' . $class2 . '"></div>';Comment #5
Tonyhawk127 commentedHad the same issue. okin's solutions works fine. No empty facets anymore! Thanks :)
Comment #6
lukus@okin - thanks for that .. I've rolled a patch agains 7.x-3.x
Please review.
Comment #8
eugene.ilyin commentedGood catch! Thank you guys.
Comment #9
eugene.ilyin commentedComment #10
eugene.ilyin commentedComment #11
eugene.ilyin commented