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

Sort is lost when using views exposed filter

$
0
0

Problem/Motivation

Original problem report, as amended by @mpp:

  • Create a paged view with an exposed block and expose the "items per page" option to allow a user to change the amount of results.
  • When applying a sort on the view and then changing the amount of items per page, the sort is lost.

Atm the views exposed form filters out get parameters in ViewsExposedForm::buildForm:

$form['#action'] = $view->hasUrl() ? $view->getUrl()->toStrin- g() : Url::fromRoute('<current>')->toString();

A quick workaround would be to alter the exposed block form to add current sort & order query parameters.

Proposed resolution

(Description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch.)

Remaining tasks

The original report (from 30 Oct 2016) was reproduced the same day, but was unable to be reproduced after 19 Feb 2017. It would be good try to reproduce this issue using the version from 30 Oct 2016, and if reproducible, identify the commit that resolved it.

User interface changes

(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)

Data model changes

(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)

Original report by [username]

(Text of the original report, for legacy issues whose initial post was not the issue summary. Use rarely.)


Viewing all articles
Browse latest Browse all 299068

Latest Images

Trending Articles



Latest Images

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