There seems to be an sql error in Notifications_Event->get_subscriptions() (line 507 of /opt/drupal-7.2-psql/sites/all/modules/contrib/notifications/notifications.event.inc. The client is using latest release of Notifications - alpha2 from Dec, 2011 - with Drupal 7.2 on postgres.:

PDOException: SQLSTATE[42803]: Grouping error: 7 ERROR: column "s.conditions" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT s.sid AS sid, s.conditions AS conditions ^: SELECT s.sid AS sid, s.conditions AS conditions FROM {notifications_subscription} s LEFT OUTER JOIN {notifications_subscription_fields} f ON s.sid = f.sid WHERE (s.status = :db_condition_placeholder_0) AND (s.send_interval >= :db_condition_placeholder_1) AND(( (s.type = :db_condition_placeholder_2) AND(( (f.type = :db_condition_placeholder_3) AND (f.intval = :db_condition_placeholder_4) )))OR( (s.type = :db_condition_placeholder_5) AND(( (f.type = :db_condition_placeholder_6) AND (f.value = :db_condition_placeholder_7) )))OR( (s.type = :db_condition_placeholder_8) AND(( (f.type = :db_condition_placeholder_9) AND (f.intval IN (:db_condition_placeholder_10)) )))OR( (s.type = :db_condition_placeholder_11) AND(( (f.type = :db_condition_placeholder_12) AND (f.intval IN (:db_condition_placeholder_13)) )))OR( (s.type = :db_condition_placeholder_14) AND(( (f.type = :db_condition_placeholder_15) AND (f.value = :db_condition_placeholder_16) )OR( (f.type = :db_condition_placeholder_17) AND (f.intval IN (:db_condition_placeholder_18)) ))))AND (s.sid > :db_condition_placeholder_19) GROUP BY s.sid HAVING (COUNT(f.sid) = s.conditions) ORDER BY s.sid ASC LIMIT 100 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 0 [:db_condition_placeholder_2] => content_thread [:db_condition_placeholder_3] => node:nid [:db_condition_placeholder_4] => 58 [:db_condition_placeholder_5] => content_type [:db_condition_placeholder_6] => node:type [:db_condition_placeholder_7] => forum [:db_condition_placeholder_8] => taxonomy_term [:db_condition_placeholder_9] => term:tid [:db_condition_placeholder_10] => 9 [:db_condition_placeholder_11] => taxonomy_term_multiple [:db_condition_placeholder_12] => term:tid [:db_condition_placeholder_13] => 9 [:db_condition_placeholder_14] => content_type_term [:db_condition_placeholder_15] => node:type [:db_condition_placeholder_16] => forum [:db_condition_placeholder_17] => term:tid [:db_condition_placeholder_18] => 9 [:db_condition_placeholder_19] => 0 ) in Notifications_Event->get_subscriptions() (line 507 of /opt/drupal-7.2-psql/sites/all/modules/contrib/notifications/notifications.event.inc).

It doesn't prevent node from being created but it does prevent the node view after submission.

It may have something to do with how postgresql differs from the mysql standard for GROUP BY and HAVING: http://stackoverflow.com/questions/1769361/postgresql-group-by-different...

Comments

bendikrb’s picture

Priority: Major » Critical

Any news on this..?

bendikrb’s picture

Status: Active » Needs review
StatusFileSize
new631 bytes

Maybe this is sufficient?

xeniak’s picture

StatusFileSize
new516 bytes

The patch above didn't work for me, but this did.

xeniak’s picture

Issue summary: View changes

add a bit more info to explain situation

alfthecat’s picture

Applied #3 patch as a precaution on my dev box, applied cleanly and when submitting a forum topic i dont get any grouping errors.

damienmckenna’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
Parent issue: » #2507375: Plan for Notifications v7.x-1.0 release

I think this is good to go.

  • Nafes committed fa46fe1 on 7.x-1.x authored by xeniak
    Issue #1426488 by bendikrb, xeniak: Grouping error when submitting a...
Nafes’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for the patches, bendikrb and xeniak!

Status: Fixed » Closed (fixed)

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