- πΊπΈUnited States w01f
Just responding to the above, still an issue on Drupal 10.0.7.
Steps to reproduce:
- Add a reference field to a content type or user. I have tested with taxonomies.
- Create a view for that content type or for users.
- Add some easily referenceable field for the entity - default title, nid/uid, etc.
- Add the reference field as a field for the view - it doesn't matter if you eventually want to exclude it from display or not.
- Add a combine fields filter as a filter for the view.
- You will not see the entity reference field as an option to add and search by.
Adding the entity reference as a relationship and then adding the term name, etc. does work and allows you to add it to the combine fields filter - but as noted, this can cause headaches with duplicated content as aggregation and other methods are currently not able to resolve this, especially if you're attempting to use view groupings, etc.
Currently the best workaround is in comment #21, though also as mentioned this isn't an ideal fix, and has the issue where changing terms/values won't be reflected in the view as the computed field is just saving a static copy/snapshot of the values of included entity reference fields upon hitting save on that entity at that time.
- Status changed to Active
over 1 year ago 5:34pm 16 April 2023 - π³π±Netherlands Lendude Amsterdam
With the way the combined field filter works, filtering is done at the SQL level, this will only ever work with adding a relationship and adding the entity label/field you actually want to search, that is how it was designed.
And yes, that will give duplicate rows in some cases, that is just how SQL works.If you want it to behave differently, try a different (non-SQL) search backend. Solr + 'Full text search' works like this.
Since this works as designed, I was split between 'Closed (works as designed)' or moving to feature request. I'll go for Feature for now, since, sure, it would be nice if you could do this.