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.

CommentFileSizeAuthor
#6 subscriptions-groupby-2798015-6.patch1.4 KBsalvis

Comments

piemanji created an issue. See original summary.

salvis’s picture

Are you on PostgreSQL?

It says

this is incompatible with sql_mode=only_full_group_by

Has someone changed this setting?

wmcmillian’s picture

Priority: Normal » Critical

I'm getting this error too.

salvis’s picture

Priority: Critical » Normal

See #2.

kaidjohnson’s picture

Priority: Normal » Critical

I 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:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sitedb.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, '1629' AS load_args, 1 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) GROUP BY u.uid, tn.nid; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => tid [:db_condition_placeholder_2] => 1 [:db_condition_placeholder_3] => -1 [:db_condition_placeholder_4] => 1629 ) in subscriptions_queue() (line 536 of /var/www/html/addp/sites/all/modules/contrib/subscriptions/subscriptions.module).

Bumping this back to critical, because it seems that the Subscription module may soon be incompatible with mysql 5.7.

salvis’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.4 KB

I'm sorry to take this long to look into this issue.

mysql is setting "only_full_group_by" mode by default now (as of 5.7).

That's the key! Please try the attached patch.

  • salvis committed ca0f0d7 on 7.x-1.x
    Issue #2798015 by salvis: Can't save any content while subscriptions...
salvis’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.