Problem/Motivation
With a default install of WxT, if you create a view with an entity reference field as an exposed filter, you will only get a text field. I've used the proposed drupal/core patch on a few modules now, and think it would be good to get into WxT.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | wxt-core-patch-reference-file-views-exposed-filter-3396217-2.patch | 744 bytes | smulvih2 |
Comments
Comment #2
smulvih2Comment #3
smulvih2With this core patch applied, using a user reference field as an exposed filter, I now get the option of autocomplete and select list.
Comment #4
skaught1-----
The patch you are applying is [comment #368] itself a dated patch 2020-10-24. The issue itself has been closed by Catch as a duplicate to :
https://www.drupal.org/project/drupal/issues/2429699#comment-13976780 [ comment #381] mentions https://www.drupal.org/project/entityreference_filter
the new issue #3347343: Add Views EntityReference filter to support better UX for exposed filters does have newest work.
@smulvih2 can you validate this patch would work as a 'feature request' then?
2-----
Scale. Similar to https://www.drupal.org/project/wxt/issues/3210080. node add / node edit page performance and scale in WXT PROFILE
this kind of patch maybe introducing scale issues. this needs to be considered.
3-----
Overall, I think you are pointing out some other general 'lacking tools' the profile doesn't include.
To bring up some other 'often installed' contrib modules (views related plugins) not in profile currently that
https://www.drupal.org/project/better_exposed_filters
wider topics:
https://www.drupal.org/project/facets
https://www.drupal.org/project/core_views_facets
Otherwise, this new ticket could be a blocker to get a Wxt v5 stable release. IMO, it should be considered later, and with wider UX/A11y and scale overviews.
Comment #5
smulvih2@skaught thanks for the feedback! Please see my reply below:
1. The issue was close as a duplicate only because the thread was getting too long and at risk of crashing the the browser - https://www.drupal.org/project/drupal/issues/2429699#comment-15075223
Looking at this thread in more detail, might be an option to try this patch from the second thread - https://www.drupal.org/project/drupal/issues/3347343#comment-15203130. That being said, I have used the original patch I proposed on a few projects now and it does allow me to add views filters for entity reference fields that work.
2. Not sure that this ticket will impact performance on node add/edit pages, and I have not noticed any performance degradation on sites using this patch. Although the patch in the second thread looks a bit cleaner so might try that one, in which case it only add one file -
/core/modules/views/src/Plugin/views/filter/EntityReference.phpwhich is a views filter plugin.3. Totally agree with
drupal/better_exposed_filters, this is a common one I find myself adding to projects.Comment #6
skaught2- i just meant to point out that tools that 'add many options/selects/depths' always show scale problems. And to draw common attention to danger of altering core too much.., why core 'only does this' in the first place (case: node/forms suffer from long core lifespan 'change difficulty'). in my experience (as a none core/acquia) dev (:
Comment #7
skaughtComment #8
smulvih2