A couple of weeks ago I suddenly started getting an issue where I could not save any content. I receive the following error message:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'website.s.value' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: INSERT INTO {subscriptions_queue} (uid, name, language, module, field, value, author_uid, send_interval, digest, suspended, last_sent, load_function, load_args, is_new) SELECT u.uid AS uid, u.name AS name, u.language AS language, s.module AS module, s.field AS field, s.value AS value, s.author_uid AS author_uid, s.send_interval AS send_interval, su.digest AS digest, su.suspended AS suspended, COALESCE(sls.last_sent, 0) AS last_sent, 'subscriptions_content_load_node' AS load_function, '246' AS load_args, 0 AS is_new FROM {subscriptions} s INNER JOIN {subscriptions_user} su ON s.recipient_uid = su.uid INNER JOIN {users} u ON su.uid = u.uid LEFT OUTER JOIN {subscriptions_last_sent} sls ON su.uid = sls.uid AND s.send_interval = sls.send_interval INNER JOIN {taxonomy_index} tn ON s.value = tn.tid WHERE (s.module = :db_condition_placeholder_0) AND (s.field = :db_condition_placeholder_1) AND (s.author_uid IN (:db_condition_placeholder_2, :db_condition_placeholder_3)) AND (tn.nid = :db_condition_placeholder_4) AND (s.send_updates = :db_condition_placeholder_5) GROUP BY u.uid, tn.nid; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => tid [:db_condition_placeholder_2] => 5 [:db_condition_placeholder_3] => -1 [:db_condition_placeholder_4] => 246 [:db_condition_placeholder_5] => 1 ) in subscriptions_queue() (line 536 of /www/sites/all/modules/subscriptions/subscriptions.module).
It goes away if I disable the module. I have updated to the latest version but this didn't fix it. I hadn't touched any modules prior to this for a good few months.
Any help would be greatly appreciated.
Comment | File | Size | Author |
---|---|---|---|
#6 | subscriptions-groupby-2798015-6.patch | 1.4 KB | salvis |
|
Comments
Comment #2
salvisAre you on PostgreSQL?
It says
Has someone changed this setting?
Comment #3
wmcmillian-coalmarch CreditAttribution: wmcmillian-coalmarch commentedI'm getting this error too.
Comment #4
salvisSee #2.
Comment #5
kaidjohnson CreditAttribution: kaidjohnson as a volunteer commentedI am running into this, too. Using
mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64)
It seems that mysql is setting "only_full_group_by" mode by default now (as of 5.7). Even after multiple different ways of resetting the sql_mode, I can't seem to shake this specific issue:
Bumping this back to critical, because it seems that the Subscription module may soon be incompatible with mysql 5.7.
Comment #6
salvisI'm sorry to take this long to look into this issue.
That's the key! Please try the attached patch.
Comment #8
salvis