I have

  • Article
  • 2 taxonomies
    • Division: division 1, division 2
    • Topics: it,supply chain

Article can have multiple topics and multiple divisions.

I have a search page /search. Where I have facets (links) blocks for topics and divisions.

Flow to problem reconstruction.
/search

  1. Click on topic: IT: /search?f[0]=topics:it
  2. Click on division 2: /search?f[0]=topics:it&f[1]=divisions:division 2
  3. Click on topic supply chain: /search?f[0]=topics:it&f[1]=divisions:division 2&f[2]=topics:supply chain

Those are actual urls in facets.

-> IT url: /search
-> division 2 url: /search?f[0]=topics:it
-> supply chanin url: /search?f[0]=topics:it&f[1]=divisions:division 2

that means that if I click to unselect IT i will lose also another filters.

Comments

frantisekivanko created an issue. See original summary.

karlosvh’s picture

Removing

elseif ($remove_children) { 
  unset($filter_params[$key]); 
}

and resetting the array values in the QueryString.php file in src/Plugin/facets/url_processor solved the problem.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Since this passes all previous tests and looks like it'd actually solve the problem I'll change this to RTBC. @frantisekivanko, can you confirm that this patch resolves the issue?

frantisekivanko’s picture

@borisson. I apply a patch and everything is working! Thank @karlosvh.

  • borisson_ committed d854674 on 8.x-1.x authored by karlosvh
    Issue #2704645 by karlosvh: Multiple facets - links are not correct
    
borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Awesome, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.