diff --git a/components/com_fabrik/models/list.php b/components/com_fabrik/models/list.php index dec9e75ce3b..4fa731f2284 100644 --- a/components/com_fabrik/models/list.php +++ b/components/com_fabrik/models/list.php @@ -3234,6 +3234,9 @@ public function buildQueryJoin($query = false) $return = array(); $joins = ($this->get('includeCddInJoin', true) === false) ? $this->getJoinsNoCdd() : $this->getJoins(); + $id = array_column( $joins, "id" ); + array_multisort( $id, SORT_ASC, $joins ); + foreach ($joins as $join) { // Used to bypass user joins if the table connect isnt the Joomla connection