An unexpected error occurred

Permalink
Hello,
I can not figure out why we keep getting this error:
An unexpected error occurred.
mysqli error: [3065: Expression #1 of ORDER BY clause is not in SELECT list, references column 'veloce_cncr1.f.fDateAdded' which is not in SELECT list; this is incompatible with DISTINCT] in EXECUTE("SELECT DISTINCT f.fID, u.uName as fvAuthorName FROM Files f INNER JOIN FileVersions fv ON f.fID = fv.fID LEFT JOIN Users u on u.uID = fv.fvAuthorUID left join FileSearchIndexAttributes on (fv.fID = FileSearchIndexAttributes.fID) where 1=1 and fvIsApproved = '1' and (f.uID = 2 or (select count(fID) from FileSetFiles where FileSetFiles.fID = f.fID and fsID in (-1)) = 0) and ((select count(fID) from FileSetFiles where FileSetFiles.fID = f.fID and fsID in (-1)) = 0) and (f.uID = 2 or (select count(fID) from FileSetFiles where FileSetFiles.fID = f.fID and fsID in (-1)) = 0) and (f.fOverrideSetPermissions = 0 or (select count(fID) from FilePermissionAssignments fpa inner join PermissionAccessList fpal on fpa.paID = fpal.paID where fpa.fID = f.fID and fpal.accessType = 10 and fpal.pdID in (0) and fpal.peID in (1,2,3,4,5) and (if(fpal.peID = 5 and f.uID <> 2, false, true)) and (fpa.pkID = 44)) > 0) and f.fID not in (select ff.fID from Files ff inner join FilePermissionAssignments fpaExclude on ff.fID = fpaExclude.fID inner join PermissionAccessList palExclude on fpaExclude.paID = palExclude.paID where fOverrideSetPermissions = 1 and palExclude.accessType = -1 and palExclude.pdID in (0) and palExclude.peID in (1,2,3,4,5) and fpaExclude.pkID in (44,43)) order by fDateAdded desc limit 0,10 ")

View Replies:
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
A possible answer to your problem can be found here.
https://www.concrete5.org/community/forums/legacy-version-5-6-x/cant...