diff --git a/includes/view.inc b/includes/view.inc index d082a0b..02ac377 100644 --- a/includes/view.inc +++ b/includes/view.inc @@ -422,6 +422,13 @@ class view extends views_db_object { } } + // For some reason, if the sort_by is empty, we receive the following + // message: 'An illegal choice has been detected. Please contact the site administrator'. + // We unset the sort by when it's empty. + if (isset($this->exposed_input['sort_by']) && empty($this->exposed_input['sort_by'])) { + unset($this->exposed_input['sort_by']); + } + // If we have no input at all, check for remembered input via session. // If filters are not overridden, store the 'remember' settings on the