Closed (works as designed)
Project:
Facets
Version:
8.x-1.0-alpha11
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2017 at 11:39 UTC
Updated:
17 Aug 2018 at 07:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
borisson_I have no idea what the TVI module is, and how it's supposed to work.
But it looks like that one is not based on search api or core search. If you want to support that, either https://www.drupal.org/project/core_views_facets, a custom facet source or a facet source implemented by tvi should fix this.
If it is based on search api, we'll need more information.
Comment #3
niklanTVI replace default views for term page by selected one. This view has search_api_index db table for data and it works fine, except, facets didn't see it.
I attached config file for that view. There is nothing that can break it. Only context by term id and sort by creation time, nothing else.
Comment #4
borisson_Ok, back to active it is. Exposed filters should work.
Comment #5
niklanTried to add exposed filter to that view and enable it as block, all works fine.
Comment #6
foolfitz commentedMe too, Facets block is empty on TVI pages.
Comment #7
niklanAny advice where to look? Which file has logic to show or not factes, maybe I can dive in and fix it.
Comment #8
borisson_I'm not sure what the problem here is, it might be that TVI provides another views display (not page or block), so that means we'd have to create a new facetsource plugin.
It might also be related to #2922344: Facets not visible on Wildcard Path - taxonomy/term/%.
Comment #9
borisson_So I checked this, it's a duplicate of #2922344: Facets not visible on Wildcard Path - taxonomy/term/%, renaming this issue and closing the other one.
Comment #10
gnikolovskiHi all.
This would be a really useful feature to have. Can somebody tell me what would be the best way to implement it? Any suggestions how to start?
Comment #11
vanlindholm commentedAny progress on this or suggested fix? A large part of my site is using wildcard paths so it would be great to have this fixed.
Comment #12
jeffamI ran into this issue while playing with Commerce product entities, Search API + Facets, and Taxonomy Views Integrator (TVI).
I discovered that enabling both the core taxonomy term view and my custom search index view and setting them to both use page displays with the path
taxonomy/term/%, I could get the facet blocks to appear and work.Comment #13
borisson_I can't seem to reproduce this, I created a new index that only displays taxonomy terms. I added the language field to that index.
I created a facet on that language field and that shows up without any issues.
I would love to fix this, but if I can't reproduce it, that will be hard.
Comment #14
vanlindholm commentedOk, so here is my observations with a sample setup for context.
Setup:
Taxonomy:
Food
-Fruit
|_apples
|_pears ...
- Nut butters, Spreads & Honey
|_Honey
|_ Nut Butters
|_ Seeds
Brand
- Brand A
- Brand B
- Brand C
- Brand D
The brand taxonomy is associated with food products and other products.
Products:
Create products (commerce 2.0) associated with the Food taxonomy and tag them with the relevant term e.g. apples would be associated with fruit and apples and brand a, b or c. Create another type of product and associated with brand d. All food products are published with the url /food/* using the pathauto pattern food/[term:parents:join-path]/[term:name]
View (search_api_view)
Path: /food/%term
Contextual filter: Product datasource: Food Category » Taxonomy term » Term ID
Facets
Create facets for Food and Brand and associate them with the above view. Add the facets to the relevant block.
Test case 1
Setup
As above but install the TVI module and associated it with the the Food taxonomy and the search_api_view.
Tick: Enable taxonomy views integrator to override presentation.
Using with view: your search_api_view
Display: page
Tick: Child terms will use these settings
Tick: Pass all arguments to views
Test Steps
Expected result
Result
Test case 2
Setup: As above but this time don't use TVI i.e. untick Enable taxonomy views integrator to override presentation for the food taxonomy.
Test Steps
Expected result
Result
Comment #15
niklanThe original issue with missing blocks using TVI is fixed by patch for TVI.
Anyway, this looks like issue is not related to Facets module. It uses
Which from Search API module ViewsDisplayBase::isRenderedInCurrentRequest(). He get info about views on page from route match and his params, which messed up and fixed by patch for TVI, beacuse it's more related to him than facets. This also fixes alot of other problems with Condition Plugins and maybe other modules. So I recommend to look at TVI issue for more information.