diff --git a/wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module b/wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module index 94be8867..472efb5c 100644 --- a/wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module +++ b/wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module @@ -1222,7 +1222,13 @@ class FieldtypeComments extends FieldtypeMulti { $countQuery->leftjoin($leftJoin); } - if(empty($sorts)) $sorts[] = "$table.created DESC"; + if(count($selectQuery->get('orderby')) && !empty($sorts)) { + $selectQuery->set('orderby', array()); + } + + if(empty($sorts)) { + $sorts[] = "$table.created DESC"; + } $selectQuery->orderby(implode(',', $sorts)); $selectQuery->limit("$start,$limit");