- Issue created by @StryKaizer
- ๐ง๐ชBelgium StryKaizer Belgium
Patch attached is also required, this is a patch for the views_filters_summary module.
Once this has been tested, I'll create an issue in the views_filters_summary queue...
- First commit to issue fork.
- ๐ฎ๐ณIndia Shyam16102001
Shyam16102001 โ changed the visibility of the branch 3408001-exposed-filters-support to hidden.
- Status changed to Needs work
6 months ago 8:38pm 14 May 2024 - ๐บ๐ธUnited States danflanagan8 St. Louis, US
I applied both patches. I keep seeing this warning:
Warning: foreach() argument must be of type array|object, string given in Drupal\facets_exposed_filters\Plugin\views\filter\FacetsFilter->acceptExposedInput() (line 141 of modules/contrib/facets/modules/facets_exposed_filters/src/Plugin/views/filter/FacetsFilter.php).
The text of the pills looks good, but the X links don't seem to be working for me. I'm new to views_filters_summary so I don't know if that is necessarily related to facets.
- ๐บ๐ธUnited States brayn7 Lexington, Ky
This doesn't apply for me with drupal 10.2. Additionally, and I should probably create a ticket for it, but removing a facet selection via the summary just resets all the filters because it is just a link to the view page im currently on. In ViewsExposedFilters.php there is a comment "We don't build real urls here. Views will handle this part for us." But thats not happening. Could be a conflict with ajax maybe idk.
- ๐ช๐ธSpain AntonioDP
Hello,
I am using the versions of:
Drupal: 10.2.4
Facets: 3.0.x-dev
View exposed filters summary: 2.0.0-alpha3
I have installed the VEFS patch fine, the facets patch I had to change it by hand because the code did not match and the summary still does not work and I get this error.
โTypeError: Illegal offset type in Drupal\Core/Entity/EntityStorageBase->load() (line 263 of /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php).โ
From what I've been digging around the $filter->options['facet'] isn't picking up anything and can't create the entity in ViewsFiltersSummary.php.
I would appreciate any help.
Thanks in advanceTranslated with DeepL.com (free version)
- ๐ง๐ชBelgium StryKaizer Belgium
Are you using the latest dev version?
If so, did you run the update script? The views exposed filters part got refactored, and running the update script is required.Can you also test if it works on a newly created view?
- ๐ง๐ชBelgium StryKaizer Belgium
I was able to reproduce the issue. The patch for views_filters_summary needs to be updated to work together with current 3.x dev version.
- ๐ง๐ชBelgium StryKaizer Belgium
We probably want to include a new processor (Lets enable it by default?) which allows enabled results to be shown, regardless of if they have results or not.
To cover the case where one facet with 2 items selected in the facet is selected.
Afterwards a user selects an extra filter in another facet, which only has results for 1 item in the first facet.The second checked item in the first facet will in that case be hidden, as there's no result for it anymore. I think many users will prefer to keep it visible, even if there are no items in the resultset matching it anymore.
This will also ensure all enabled items are always visible in the summary, even if they have no results anymore.
- ๐ง๐ชBelgium StryKaizer Belgium
Attached is another approach.
This ensures all active filters are always visible as facet result, even when they are not relevant anymore (having 0 results).
This gives for better UX for the enduser, and no patches are required anymore on views_filters_summary -
strykaizer โ
committed 6cdf48d6 on 3.0.x
Issue #3408001 by strykaizer: Exposed filters: Support...
-
strykaizer โ
committed 6cdf48d6 on 3.0.x
Automatically closed - issue fixed for 2 weeks with no activity.