- π«π·France paul_leclerc Lausanne Switzerland
@jrochate, it appears to me that using the field that targets the taxonomy as a filter only result to a textfield that required the term id.
Its means that selective_better_exposed_filters needs verf β module to works properly ? - π΅πΉPortugal ricardofaria
Having the same error after selecting "use only used terms". Using as filter criteria.
- π§πͺBelgium davidiio
Hi everyone!
We had the same problem using the module selective_better_exposed_filters trying to reduce the number of options of a "taxonomy term with depth" filter.
I made small ugly patch.
Noticing the$filter->definition['field_name']
could not be found and so the$field_id
variable could not be set I have set it after using this code:if($field_id == NULL) { $field_id = $filter->options['reference_field']; }
I guess a better approach would be to check if the filter is indeed a "taxonomy_term_with_dpeth" filter but I really could not find this info when inspecting the
$filter
variable :( I am not having trouble with fields, but rather trying to reduce a term filter itself:
(Taxonomy term) Taxonomy term: Term (exposed)This doesn't seem to work at all. I get the following:
Warning: Undefined array key "field_name" in Drupal\selective_better_exposed_filters\Plugin\better_exposed_filters\filter\SelectiveFilterBase::exposedFormAlter() (line 68 of /var/www/html/web/modules/contrib/selective_better_exposed_filters/src/Plugin/better_exposed_filters/filter/SelectiveFilterBase.php)
I have a custom entity with a term entity reference base field. Adding the filter from the field doesn't give the term settings, so you have to add it through the relationship to the term.
Module doesn't seem to support that.
-
stomusic β
committed 3e4b3c9c on 3.0.x
Issue #3132493 by davidiio: Does not show terms in hierarchy
-
stomusic β
committed 3e4b3c9c on 3.0.x
- Status changed to Closed: won't fix
about 1 year ago 8:51pm 12 October 2023 - πΊπ¦Ukraine stomusic Ukraine
Sorry, but I see no possibilities to work with "Has taxonomy terms (with depth)" filter because current logic based on retrieving of results some reference field data and this filter missing any info about related field.
- Status changed to Active
6 months ago 2:06pm 17 June 2024 - π³π±Netherlands willempje2
TaxonomyIndexDepth is a bit different because it has the taxonomy_index table unlike other entities.
Maybe we could utilize this instead of field references.See patch.
There is some redundancy ( checking all related terms ) in here which could have impact on performance.
In our cases this does not seem to give any issues. - π«π·France tostinni
@willempje2 it seems to be working fine with 3.0.2.
However we noticed that counting items was duplicated when we checked "Show hierarchy in dropdown".
As branch 2.x is deprecated, I think we should move this issue to 3.x
Looking to resolve this exact same issue / need on our site.
The patch is #10 is not working for me.
The patch does enable the options to display for our taxonomy term with depth exposed filter, however no matter what settings i apply, all filter options are removed from the view when there are definitely valid options that should be showing.
We're using solr search index and I believe I have enabled all of the correct field indexes but if there's specific settings that need to be enabled to get this to work, please advise. Getting this to work would be a massive help for what we're trying to do.
We're on Drupal Core 10.3.9 and SBEF 3.0.3
Thanks.
Was apparently on the wrong branch of SBEF, the patch does work! thank you!