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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

derhasi’s picture

Status: Active » Needs review

And there it is: a one-liner that unsets the facets $this->activeItems[..] entry.

derhasi’s picture

derhasi’s picture

Status: Needs review » Closed (won't fix)

Ah, 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

derhasi’s picture

Status: Closed (won't fix) » Closed (works as designed)
derhasi’s picture

For reference: the new issue on facetapi project, regarding the fields containing ":"
- #1884152: Some active facets are not removed from filter on unmet dependencies