I have an issue witha dependent facet. On my site I have links to a facetted page. Those links are activating a facet that is only shown when another facet is active on a certain value. While the facet itself works (the content is being filtered correctly), the facet does not show. This also means that the facet cannot be deactivated.

I've written a patch that, when a facet is activated, it does not check the dependent facets anymore, and just outputs the results. I will add the patch in a bit.

Issue fork facets-2937619

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fabianderijk created an issue. See original summary.

fabianderijk’s picture

Title: Shop dependent facet when active, but depending from not active » Show dependent facet when active, but depending from not active
Status: Active » Needs review
FileSize
622 bytes

Status: Needs review » Needs work

The last submitted patch, 2: ShowActiveDependentFacets-2937619-2.patch, failed testing. View results

fabianderijk’s picture

Status: Needs work » Needs review
FileSize
622 bytes
borisson_’s picture

I think the better solution is the one in https://www.drupal.org/project/facets/issues/2908937, that should also make this problem go away.

borisson_’s picture

Status: Needs review » Closed (duplicate)
dealancer’s picture

Status: Closed (duplicate) » Needs review
FileSize
622 bytes

#2908937 is not likely going to work for facets served over REST.

Also this ticket is not a duplicate of #2908937 as it provides an alternative solution.

I have rerolled patch #4 for those who may be interested in using it.

Status: Needs review » Needs work

The last submitted patch, 7: facets-show_dependent-2937619-7.patch, failed testing. View results

Anybody’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

@dealancer, are you using this patch actively? #7 reports a failing test, could you check that, add some tests to ensure this works as expected (and fails before)?

Updating version.

Confirming #7 and agree this still makes a lot of sense in the described context.

Anybody’s picture

Issue tags: +Needs tests, +Needs testing

Rerolled the patch against 2.0.x as MR, still needs test modification for expected values, additional tests and testing!

recrit’s picture

hiding old patch so only the MR shows