I noticed an issue with the latest dev version of the CTools Views Content module. When a view is created with exposed sorts and the view pane is added to a panel page and you configure the view pane settings in panels, the Sort By and Sort Order dropdowns do not retain the value you select.

Steps to reproduce:

  1. Create a view with a content pane display.
  2. Add a few sort criteria and set them as exposed.
  3. In the view's pane settings section, select "Use exposed widgets form as pane configuration" under Allow Settings.
  4. Add the view pane to a panel/panelized page.
  5. In the view pane's settings, select a different value in the Sort By and Sort Order dropdowns, then click Finish.
  6. Go back into the view pane's settings and you will see that the dropdowns have reverted back to their default values instead of the values you selected in the previous step.

Some additional information that may help narrow down the issue:

  • Exposed filters work as expected. The issue is limited to exposed sorts.
  • The exposed sort option appears to be saved to the database since previewing or saving and viewing the page shows the view with the correct sort order. However if you go back into the view pane's settings form, the dropdowns do not show the correct value so I think the issue is with reading the current configuration from the database and selecting the correct Sort By/Order values in the dropdowns.
Files: 
CommentFileSizeAuthor
#2 views-exposed-sorts-2037469-1.patch1.38 KBJānis Bebrītis
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: tests were executed, but no results were found.
[ View ]

Comments

Jānis Bebrītis’s picture

Project:Chaos tool suite (ctools)» Views
Version:7.x-1.x-dev» 7.x-3.x-dev
Component:Views Content» exposed filters

I stumbled across the same issue - we're using views panes and none of sorts would display saved values. I debugged it to views module, filters actually get wrong default values.

Here's patch (for latest 7.x-3.x) I created to solve this issue.

Jānis Bebrītis’s picture

StatusFileSize
new1.38 KB
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: tests were executed, but no results were found.
[ View ]

Somehow I lost the patch, here it is

Jānis Bebrītis’s picture

Status:Active» Needs review

changing status

jlapp’s picture

Issue summary:View changes
Status:Needs review» Reviewed & tested by the community

Thanks Janis, your patch in #2 resolved this issue for me!

dsnopek’s picture

RTBC +1!

We're using this patch in Panopoly. :-)

guillaumev’s picture

Just confirming that this is also working on my side.

dsnopek’s picture

Issue tags:+panopoly

Status:Reviewed & tested by the community» Needs work

The last submitted patch, 2: views-exposed-sorts-2037469-1.patch, failed testing.

mglaman’s picture

Status:Needs work» Reviewed & tested by the community

Looks like a test bot hiccup. Putting back to RTC.

Detect a test run failure
Ensure that you can install SimpleTest locally and invoke tests using the command line script.

thePanz’s picture

The patches in #2 fixes the issue and correctly applies on latest 3.11 release.