- Issue created by @tavib47
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - @tavib47 opened merge request.
I created a facet which uses a taxonomy reference field and I want to display the whole hierarchy in my widget. The problem is that JsonApiResponseWidget
from jsonapi_search_api_facets
submodule has some broken code and only takes into consideration the children of the first level terms. The buildListItems
method is missing the recursive call.
Make sure you have a taxonomy with multiple levels and terms from all levels are referenced from a content type and indexed in the search api index.
Create a facet using a "JSON:API Search API Facets" source. Choose a taxonomy term reference field. Check the "Use hierarchy" option within Facet settings.
Refactor the buildListItems
method in JsonApiResponseWidget
.
Active
1.0
Code