Hello,
My goal is to allow users to select choices in the Exposed Filters, press the Apply button, still see their filter choices and allow them to change their choices and press the Apply button again to better filter their view to what they want to see.
The setting for Block cache I am referring to is at /admin/settings/performance (the recommended setting is to have it Enabled)
http://www.screencast.com/users/trupal218/folders/Jing/media/a995269a-fc...
Note: My views setting for Caching is set to None.
Problems with Exposed Filters in a Block when Block cache is Enabled:
When the exposed form Apply button is clicked, the view filters the results correctly and the choices can be seen in the URL [good]
BUT... all the exposed filter choices reset to default after Apply is clicked [not good]
>> With Block Cache Disabled, the filter choices stay showing after Apply is clicked
http://www.screencast.com/users/trupal218/folders/Jing/media/875a8118-61...
>> With Block Cache Enabled, the filter choices reset to default
http://www.screencast.com/users/trupal218/folders/Jing/media/4e64697c-6d...
I think the best would be to have the filter selections still show and only reset if the user browses away and comes back to the page, or manually reloads the page. Is the behavior above 'as per design' with the Exposed Filter as a Block with Block cache enabled? I really hope not =) I would like to take advantage of the Block Cache setting for all other blocks on the site, but for the Exposed Filter as a Block it seems to have negative effects.
Note: This happens for anonymous and authenticated users, but not admins (uid1)
Then I tried the Filter's Remember option and encountered more problems:
I found the [x]Remember option in the Views filter settings and tried it for my exposed filters. I thought this would help keep the filter choices showing after Apply is clicked, which it did but ran into more problems (as Block Cache is enabled).
For authenticated users (non admins and non anonymous), the filter selections stay showing after pressing Apply [good]...but the problem is that the filter continues to go back to the selection even after I remove the choice in the filter.
Example1: exposed filter with dropdown of choices -Any- / Male / Female
Problem: I change the filter to Male and press the Apply button. Male still shows in the filter [good]. I change the filter back to -Any- and press the Apply button. The filter changes back to Male [not good] but the view correctly not filtering to Male and URL is correctly not showing Male as a filter. I try changing to Female, press Apply, then it changes back to Male again. This looks to be a bug?
Example2: exposed taxonomy id autocomplete filter
Problem: I type text into the autocomplete filter and press Apply. I then remove the text and pressed Apply again, but the previous text comes back.
For anonymous users, the filter choices reset to the default after pressing Apply even with Remember option selected. My guess is that the option being selected in being cached so that it continues to reset to what was selected before. I hope there is a way to resolve this issue for exposed filters in a block.
Please let me know if my explanation was unclear or if I can provide more information to help troubleshoot the problem.
Thank you very much in advance
Comments
Comment #1
Bevan commentedCan you test if the patch at #910864: Exposed filter blocks are cached fixes this issue for you? If so, please update #910864 and mark this one as duplicate. Thanks! (:
Comment #2
Bilmar commentedI will test the patch at #910864: Exposed filter blocks are cached.
Thank you!