I have a hierarchical taxonomy I'm using as a facet that loads up looking something like (expanded by default):
[ ] Family (6)
[ ] Adoption (2)
[ ] Child Support (5)
If I select Adoption, I correctly receive a list of 2 items, and have an URL like:
/search_page/keyword?f[0]=im_field_topics%3A97
However, when the results load, both the Family and Adoption checkboxes are checked (though their counts go away), like:
[x] Family
[x] Adoption
[ ] Child Support (5)
This seems fine at first, but now the user has no way to add the 6 items tagged with the parent term (Family). Further, if I start over and first select Family, I get (as expected) 6 results and the UI shows:
[x] Family
[ ] Adoption (2)
[ ] Child Support (5)
However, if I then click Adoption, I receive a total of 8 results (those for both parent and child) with a URL like:
/search_page/keyword?f[0]=im_field_topics%3A102&f[1]=im_field_topics%3A97
...but the UI looks the same as in the first example when I was only filtering on the child term:
[x] Family
[x] Adoption
[ ] Child Support (5)
So... same UI representation for two different results.
I took a look at the Javascript code doing the checkboxes, but it seems like the issue may go all the way back to when it's being decided whether or not a given term is "active". I suppose we may need to distinguish between "active" and "active_trail" or somesuch. Thoughts?
Thanks for all the great work!
Comments
Comment #1
cpliakas commentedHi brant.
Thanks for posting. Can you please provide some steps to reproduce on a clean install of Drupal including which implementing module you are using?
I know that with hierarchical sorts, there are some interesting results when using Search API, as you have to configure the hierarchical behavior to match what you are trying to do. I still don't have a handle on your use case, but if I can reproduce then maybe I can provide some guidance.
Thanks,
Chris
Comment #2
cpliakas commentedWhoops, wrong status.