Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292007

Views exposed form block options are not updated immediately when adding additional sorts, filters, etc (Caching?)

$
0
0

Problem/Motivation

In the process of triaging issue #2823541: Table clicksort is lost when using views exposed filter @xjm and I encountered another problem relating to the views exposed block form where the options and/or widgets displayed on the exposed block were not immediately visible on the view page after changing the configuration of the view itself.

To reproduce the issue:

  1. Add some content into a default new standard profile 8.4.x HEAD D8 site
  2. Create a page view (with URL /sortmissing), add exposed filters for sorting criteria (eg. content type for filter and authored on, authored by, for sort criteria)
  3. Add a full pager with exposed option "Allow user to control the number of items displayed in this view"
  4. Under Advanced config of the view, select Yes for Exposed Form, choosing Basic form type
  5. Under Structure - Block Layout - Place Block choose the newly created exposed form and place it in a region (eg. Sidebar)
  6. Go the view page (/sortmissing), notice which options and widgets are shown
  7. Change the view and add another option into an existing filter (eg. add Title to the Sort Criteria so that you have three options: authored on, authored by and title as options there)
  8. Switch back to view page and just refresh the page or click Apply on the exposed block form to refresh the display - the resulting page does not show the newly added option

Based on how unpredictable the display of the exposed block options happens as it eventually refreshes after a few attempts clicking on the page and the various options (usually after 3-4 refreshes of changing the chosen filtering options things seem to update), this would possibly be related to caching and how the cache is being invalidated on the exposed filters block for the view.

Attached with the issue is the export of the view I've used to arrive at the issue.

- - - - - - - - - - - - - -

This issue emerged from #2823541: Table clicksort is lost when using views exposed filter and the following folks deserve credit:
@anneeasterling = #2823541-9: Table clicksort is lost when using views exposed filter
@krknth = #2823541-10: Table clicksort is lost when using views exposed filter

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 292007

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>