diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index bc83c11f6..51a425c2c 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -522,7 +522,7 @@ class Lists extends WidgetBase /* * Apply sorting */ - if (($sortColumn = $this->getSortColumn()) && !$this->showTree) { + if (($sortColumn = $this->getSortColumn()) && !$this->showTree && in_array($sortColumn, array_keys($this->getVisibleColumns()))) { if (($column = array_get($this->allColumns, $sortColumn)) && $column->valueFrom) { $sortColumn = $this->isColumnPivot($column) ? 'pivot_' . $column->valueFrom