Closed (duplicate)
Project:
Better Exposed Filters
Version:
7.0.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 May 2024 at 20:51 UTC
Updated:
21 Nov 2025 at 00:15 UTC
Jump to comment: Most recent
Comments
Comment #2
ezra commentedSeconding this. I'll add that I thought turning ajax off would be a solution, but it not fix the issue.
Comment #3
cajewell commentedI also ran into this issue. I have the same situation, with all five steps identical to the steps joakland listed above. The data in the view block does reset, but the check boxes or default fields on the exposed form remain checked after clicking reset. I tested this in versions 6.0.6 and 7.0.0-beta1, and both had this result. For troubleshooting, I set up a dev site and reverted back to BEF versions 6.0.3, 6.0.4, and 6.0.5. All of these versions worked as expected, with the results reset and the checkboxes cleared. So the issue started at version 6.0.6.
Comment #4
smustgrave commentedComment #5
smustgrave commentedCan confirm this issue but don't have a fix.
Comment #6
idiaz.ronceroPlease see this comment for a quick workaround that just re-enables the Drupal core behavior - to avoid AJAX on Clear Filter buttons.
With facets 3.x we are facing the exact opposite as cajewell said: exposed form in a block is reset when using clear filters; but view content area results are not - they keep the old filters applied.
Comment #7
smustgrave commentedGoal of contrib is to be able to do things core cannot. Agree this is a bug but can’t just rip it out.
Temporary solution that would be accepted is to add a setting to disable this feature.
Will need an update hook that defaults to true so existing sites aren’t broken.
May also be a bug with the views module itself but haven’t dug through the issue queue.
Comment #8
aaronbaumanThe suggestion in #6 does not fix the issue for me.
Reset button still causes a redirect to the attached page display's URL, rather than reloading the current URL.
Not sure if straight duplicate, but seems like this is a core issue also.
#3163940: Viewsform has incorrect form submit URL if loaded through ajax
Comment #9
damienmckennafwiw the "reset all" link doesn't even show for me, which might be a separate bug.
Comment #10
anicotoHaving the same issue on a different use case, I have view with exposed filters but "Exposed form in block" is disabled. I am using the page view with ajax and also have a view template with a subtitle that should change when filter selections change.
The view filters are working but when I click on reset the exposed values change but the subtitle in the twig template is not refreshing.
In my case I was able to solve the issue by changing the variable I was using to render the title from 'view.exposed_raw_input.exposed_filter['#value']' to 'view.exposed_widgets.exposed_filter['#value']'
Wishing this could be of help!
Comment #11
davej commentedSame issue here after upgrading from Drupal 10.2.10 + better_exposed_filters 6.0.3 to Drupal 10.4.1 + better_exposed_filters 7.0.4 .
One difference in behaviour here, when using a page display plus block display plus filters in block (rather than a block display on a node): as well as the exposed form elements not resetting, the data displayed is also not resetting. On clicking Reset, the page reloads with the same URL (including filter values), same values selected on the exposed form and same results shown in page display and block display.
This was working correctly before the upgrade.
[Edit] Also now tested in Drupal 10.4.1 + better_exposed_filters 6.0.3, which works correctly.
Comment #12
foxy-vikvik commentedFor me patch from this issue resolve my issue https://www.drupal.org/project/drupal/issues/3032353
Comment #13
smustgrave commentedlets see when that lands! Either way lets get a test case in (anyone that writes it gets credit)
Comment #14
jonmcl commentedI'm seeing this issue without AJAX involved. I'd be amazed if it's true, but I think it goes back to this 4 year old change #2473875: Convert uses of $_SESSION to symfony session retrieved from the request
\Drupal\better_exposed_filters\Plugin\views\exposed_form\BetterExposedFilters::resetForm has the following code:
whereas, after the change, \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase::resetForm has the following code:
So, I'm thinking the right thing to do would be to make BetterExposedFilters::resetForm work with Symfony sessions too? $_SESSION does not appear to have the data anymore.
Comment #15
jonmcl commentedIgnore my stupidity. We are still on BEF 6.0.6. My proposed changed was implemented in 7.x with #3469712: Remembered filters don't reset with BEF
Comment #16
ahmad khader commentedMaybe we should open a ticket for views core to use something like
[data-drupal-selector^="edit-reset"]instead, since logically speaking, there shouldn't be two IDs with the same values if there are two viewsComment #17
smustgrave commented#3032353: Exposed forms in a block are not updated by AJAX is in review so question is if anything needs to be done here.
Comment #18
smustgrave commentedIssue in #17 appears to address the problem with the reset button. Recommend everyone focus there.
Comment #20
smustgrave commented