Hello! On the Signup Administration page, I receive the following errors:

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "e.event_start" must appear in the GROUP BY clause or be used in an aggregate function in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT DISTINCT (n.nid), n.title, s.status AS signup_status, COUNT(s_l.nid) AS signup_total, s.close_signup_limit AS signup_close_signup_limit, e.event_start, e.timezone FROM signup s INNER JOIN node n ON n.nid = s.nid LEFT JOIN signup_log s_l ON s.nid = s_l.nid LEFT JOIN event e ON e.nid = n.nid GROUP BY n.nid, n.title, signup_status, signup_close_signup_limit ORDER BY n.title ASC LIMIT 25 OFFSET 0 in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 144.

I am using Drupal 5.5 with PostgreSQL.

Comments

dww’s picture

Status: Active » Closed (duplicate)

http://drupal.org/node/142402
Should already be fixed in 5.x-1.x-dev. Could you test that and report back here that everything's cool? I should really cut a 5.x-1.1 release, there have been a fair number of bugs fixed now since 5.x-1.0, including this one. See the CHANGELOG for details:

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/signup/CHAN...

WISEOZ’s picture

Version: 5.x-1.0 » 5.x-2.3

As it turns out, I'm actually using 5.x-2.3 and not to 5.x-1.0 version. I corrected the version on this issue as such.

Anyhow, were you suggesting that this bug should be fixed already in 5.x-2.3?

dww’s picture

Yes, should be fixed even in 5.x-2.2, certainly by 5.x-2.3...

WISEOZ’s picture

Okay, then I still have a problem. I have confirmed that I am on 5.x-2.3 and still receiving this same error.

dww’s picture

Assigned: Unassigned » dww
Status: Closed (duplicate) » Needs review
StatusFileSize
new680 bytes

Oh, I see what's up. This is for a different query. Please try the attached patch and let me know if it works. Thanks.

WISEOZ’s picture

I executed the patch but still get the following error on the Signup Administration screen.

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "e.event_start" must appear in the GROUP BY clause or be used in an aggregate function in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT DISTINCT (n.nid), n.title, s.status AS signup_status, COUNT(s_l.nid) AS signup_total, s.close_signup_limit AS signup_close_signup_limit, e.event_start, e.timezone FROM signup s INNER JOIN node n ON n.nid = s.nid LEFT JOIN signup_log s_l ON s.nid = s_l.nid LEFT JOIN event e ON e.nid = n.nid GROUP BY n.nid, n.title, signup_status, signup_close_signup_limit ORDER BY n.title ASC LIMIT 25 OFFSET 0 in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 144.
dww’s picture

StatusFileSize
new908 bytes

Oh, whoops. You must be using event 5.x-1.*. I just tested that and found it's broken. Please try this patch, instead.

In fact, upon closer inspection of event 5.x-2.*, the patch from #5 isn't necessary, since event_select() always uses "AS event_start", so just hard-coding "event_start" is in fact safe in signup_event_5.x-2.inc...

Cheers,
-Derek

p.s. If you test a patch and it doesn't solve the reported bug, don't forget to set the status back to "code needs work". Thanks.

WISEOZ’s picture

It worked! Thank you!

dww’s picture

Status: Needs review » Fixed

Great, committed to HEAD. This will be out officially once I release 5.x-2.4.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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