diff --git a/administrator/components/com_content/models/articles.php b/administrator/components/com_content/models/articles.php index 33ecc606626c6..108bb65c19200 100644 --- a/administrator/components/com_content/models/articles.php +++ b/administrator/components/com_content/models/articles.php @@ -388,6 +388,11 @@ protected function getListQuery() $orderCol = $this->state->get('list.ordering', 'a.id'); $orderDirn = $this->state->get('list.direction', 'DESC'); + if ($orderCol == 'a.ordering' || $orderCol == 'category_title') + { + $orderCol = $db->quoteName('c.title') . ' ' . $orderDirn . ', ' . $db->quoteName('a.ordering'); + } + $query->order($db->escape($orderCol) . ' ' . $db->escape($orderDirn)); return $query;