- π¨π³China skyredwang Shanghai
Tested #34 with Facets. Steps:
1. Go to edit the views of interest
2. Expand "Advanced" section
3. Click "Exposed form style: Settings"
4. Putf
in the Preserve query parameters from URL
5. Save and clear cacheIt works.
- πΊπΈUnited States sidgrafix
Tested #36 Works Great (this feature should definitely be added)
+1 (awesomesauce) saved me from having to use hook_form_views_exposed_form_alter() to modify the submitted query parameters for the exposed filter.
Specifically useful when having other view blocks on page that use contextual filters with setting "provide default value" -> "Type: Query parameter" which updates the content in those blocks when the set parameters are passed by URL from custom links that provide those additional parameters.
- π§πͺBelgium tim-diels Belgium π§πͺ
- last update
almost 2 years ago 30,322 pass - π¬π§United Kingdom aaron.ferris
Patch from #42 is working well for me, we have a search implementation that has custom query parameters that were being lost on exposed form search. Although that's not specifically facets, but I believe the issue is the same.
- last update
about 1 year ago 29,686 pass - last update
about 1 year ago 30,341 pass Confirming the issue with Better Exposed Filters described in #33. Somehow, when BEF is used, the value already comes as an array. Attaching a patch with a fix.
- last update
about 1 year ago 30,374 pass - last update
about 1 year ago 30,667 pass - last update
10 months ago 29,722 pass - π¦πΉAustria maxilein
The patch in #45 applies and works with D10.2.5.
But only with a Exposed form style:Basic (Exposed form in block:no)
It does not work with: Basic (with layout)
- First commit to issue fork.
- Merge request !88042681953 | Allow exposed form to preserve URL query parameters β (Open) created by SimeonKesmev
- π§π¬Bulgaria SimeonKesmev
The extra empty parameter check from #36 and added in #42 broke the handling of array parameters (such as facets) for me. I've fixed it by first cleaning the variable mixing and then deleting this check as It looks to me that is already handled in
if (!isset($form[$name]) && !empty($query[$name]) && ($value = $query[$name]) !== '') {
- Status changed to Postponed: needs info
5 months ago 10:23pm 5 September 2024 - π¬π·Greece vensires
The existence of this patch initially troubled me into thinking I need this patch but for the specific use case this issue was created I think we are already fine using the Search API module. Unless you are using facets without indexed views (using search_api) which I think is not possible...
The functionality was already built in #2378945: Facets are lost by Views on keyword search β and it's provided - without using any patches - in the Query settings form:
So the main question here is... do we still need issue?
- π·π΄Romania gge
Another use case where this patch is useful: https://www.drupal.org/project/calendar_view/issues/3403103 π¬ Stay on same month/week after exposed filtering Needs review
- π¬π·Greece vensires
I add π¬ Stay on same month/week after exposed filtering Needs review as a related issue then. But if we are to do anything in Drupal core, we have to update the issue summary since the initial one (using search_api & facets) is not valid anymore.