Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column '2140841-1.f.fid' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT p.*, f.uri AS uri, f.filemime AS filemime, f.timestamp AS timestamp, f.filename AS filename, u.uid AS uid, u.name AS name, n.nid AS nid FROM {file_managed} f INNER JOIN {photos_image} p ON p.fid = f.fid INNER JOIN {node} n ON n.nid = p.pid INNER JOIN {users} u ON u.uid = f.uid INNER JOIN {node_access} na ON na.nid = n.nid WHERE (( (na.gid = :db_condition_placeholder_0) AND (na.realm = :db_condition_placeholder_1) )OR( (na.gid = :db_condition_placeholder_2) AND (na.realm = :db_condition_placeholder_3) )OR( (na.gid = :db_condition_placeholder_4) AND (na.realm = :db_condition_placeholder_5) ))AND (na.grant_view >= :db_condition_placeholder_6) ORDER BY f.fid DESC LIMIT 5 OFFSET 0; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => all [:db_condition_placeholder_2] => 0 [:db_condition_placeholder_3] => photos_access_author [:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => photos_access [:db_condition_placeholder_6] => 1 ) in _photos_block_image() (line 1377 of /home/italyhik/www/aricv/sites/all/modules/photos/photos.module).

Additional

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user '2140841-1'@'10.15.20.65' for table 'drp7_watchdog': INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:1248:"SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column '2140841-1.f.fid' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT p.*, f.uri AS uri, f.filemime AS filemime, f.timestamp AS timestamp, f.filename AS filename, u.uid AS uid, u.name AS name, n.nid AS nid FROM {file_managed} f INNER JOIN {photos_image} p ON p.fid = f.fid INNER JOIN {node} n ON n.nid = p.pid INNER JOIN {users} u ON u.uid = f.uid INNER JOIN {node_access} na ON na.nid = n.nid WHERE (( (na.gid = :db_condition_placeholder_0) AND (na.realm = :db_condition_placeholder_1) )OR( (na.gid = :db_condition_placeholder_2) AND (na.realm = :db_condition_placeholder_3) )OR( (na.gid = :db_condition_placeholder_4) AND (na.realm = :db_condition_placeholder_5) ))AND (na.grant_view >= :db_condition_placeholder_6) ORDER BY f.fid DESC LIMIT 5 OFFSET 0; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => all [:db_condition_placeholder_2] => 0 [:db_condition_placeholder_3] => photos_access_author [:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => photos_access [:db_condition_placeholder_6] => 1 ) ";s:9:"%function";s:21:"_photos_block_image()";s:5:"%file";s:63:"/home/italyhik/www/aricv/sites/all/modules/photos/photos.module";s:5:"%line";i:1377;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://www.italyhikers.it/aricv/?q=photos [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 44.210.237.158 [:db_insert_placeholder_9] => 1665064449 ) in dblog_watchdog() (line 157 of /home/italyhik/www/aricv/modules/dblog/dblog.module).