diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index c4bfd4f43..862e96d40 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -1496,14 +1496,20 @@ class Lists extends WidgetBase $this->sortColumn = $sortOptions['column'] = $column; - $this->putSession('sort', $sortOptions); - /* * Persist the page number */ $this->currentPageNumber = post('page'); - return $this->onRefresh(); + /* + * Try to refresh the list with the new sortOptions. Put the + * new sortOptions in to the session if the query succeeded. + */ + $result = $this->onRefresh(); + + $this->putSession('sort', $sortOptions); + + return $result; } }