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.
#2 views-exposed-sorts-2037469-1.patch1.38 KBJānis Bebrītis
PASSED: [[SimpleTest]]: [MySQL] 1,658 pass(es).
[ View ]


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

new1.38 KB
PASSED: [[SimpleTest]]: [MySQL] 1,658 pass(es).
[ 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