Mysqli Order by clause is not in group by

When I use the Exhibits plugin i get the following error:
“Mysqli prepare error: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘akhlaghi_omeka.ep.order’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by” followed by 23 lines etc.

I looked at a 2016 thread on this and followed the Omeka solution here.

When I open the Db.php file, it looks like the correction has already been made? Here is what I see:

public function useTestConfig()
$params = Zend_Registry::get(‘test_config’)->db->toArray();
$params[‘driver_options’][‘MYSQLI_INIT_COMMAND’] =

Any thoughts?

What version of Omeka are you using?

I’m using Omeka 2.4. Is the answer to upgrade?

Thanks for getting back to me so soon!

Yes, upgrading to 2.5 or later should fix this problem. I’d suggest going to 2.6, the latest version.

1 Like

That fixed it! Thanks!