dashboard members gives an exception on the sql
Permalink
In a newly installed environment (Core version 5.7.5.9; mysql 5.7.15) on nginx 1.10 we have an error when we click on Members in de dashboard:
An exception occurred while executing 'SELECT distinct (u.uID) FROM Users u LEFT JOIN UserSearchIndexAttributes ua ON u.uID = ua.uID LEFT JOIN UserGroups ugRequired ON ugRequired.uID = u.uID WHERE (ugRequired.gID in (-1,3)) OR (ugRequired.gID is null) ORDER BY u.uDateAdded desc LIMIT 10 OFFSET 0': SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'nemo.nioz.nl.u.uDateAdded' which is not in SELECT list; this is incompatible with DISTINCT
What caused this and how can we solve it?
An exception occurred while executing 'SELECT distinct (u.uID) FROM Users u LEFT JOIN UserSearchIndexAttributes ua ON u.uID = ua.uID LEFT JOIN UserGroups ugRequired ON ugRequired.uID = u.uID WHERE (ugRequired.gID in (-1,3)) OR (ugRequired.gID is null) ORDER BY u.uDateAdded desc LIMIT 10 OFFSET 0': SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'nemo.nioz.nl.u.uDateAdded' which is not in SELECT list; this is incompatible with DISTINCT
What caused this and how can we solve it?
Thanks for your quick and helpful reply. I followed the instruction onhttps://serverpilot.io/community/articles/how-to-disable-strict-mode... and that solved the problem
Usually when mysql is set to be a bit more lax about those things it doesn't raise that error.
I can't be 100% sure though, you might want to take it to your site's administrator.