Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If we set up a dependency with "forced deactivation" for a "child" facet, the facet will disappear when the "parent" facet is deselected. In that case the given active item of the "child" facet is not valid (or at least shall not be used) anymore. We then should remove the facet value from the active items list, so they won't appear in the other facets' links - and whould even shorten those links, so we do not mess up the URL when clicking and disabling again a lot of facets.
I'll post a patch for that in the next comment.
Comment | File | Size | Author |
---|---|---|---|
#2 | facet-dependency-active_item_cleanup-1884116-1.patch | 569 bytes | derhasi |
Comments
Comment #1
derhasi CreditAttribution: derhasi commentedAnd there it is: a one-liner that unsets the facets $this->activeItems[..] entry.
Comment #2
derhasi CreditAttribution: derhasi commentedComment #3
derhasi CreditAttribution: derhasi commentedAh, i just recognized two things:
- that should be implemented by facetapi itself
- and it IS already integrated by facetapi, but search_api fields containing ":" seem to make some problems
Comment #4
derhasi CreditAttribution: derhasi commentedComment #5
derhasi CreditAttribution: derhasi commentedFor reference: the new issue on facetapi project, regarding the fields containing ":"
- #1884152: Some active facets are not removed from filter on unmet dependencies