Hello,
Using PostgreSQL, when I try to create a simple queue (admin/structure/nodequeue/add/nodequeue) I have the following error :
PDOException : SQLSTATE[42803]: Grouping error: 7 ERREUR: the column « q.title » must appears in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT q.*, COUNT(s.sqid) AS subqueues FROM nodequeue_queue ... ^: SELECT q.*, COUNT(s.sqid) AS subqueues FROM {nodequeue_queue} q LEFT JOIN {nodequeue_subqueue} s ON q.name = s.name WHERE q.name IN (:to_load_0) GROUP BY q.name; Array ( [:to_load_0] => add ) in nodequeue_load_queues() (line 614 in .../sites/all/modules/contrib/nodequeue/nodequeue.module).
PS: I tried to translate the error the best as I can from french.
Comments
Comment #0.0
IcanDivideBy0 commentedformatting error
Comment #1
IcanDivideBy0 commentedI can't get this module working (at least the main functionality which is create a simple queue) using PostgreSQL.
Comment #2
amateescu commentedCan you try this patch?
Comment #3
IcanDivideBy0 commentedYour patch works well, but still got an error :
The attached patch fixed it (in addition with yours).
Comment #5
IcanDivideBy0 commentedAssuming the same thing has to be done in
nodequeue_load_subqueuesComment #7
IcanDivideBy0 commentedThe patch only applies for 7.x-2.x branch
Comment #8
IcanDivideBy0 commented#5: 1475396_cast_int.patch queued for re-testing.
Comment #9
amateescu commentedHm, wait a minute, what branch (and module version) are you actually using? Because my patch was for 7.x-3.x but yours is for 7.x-2.x :)
Comment #10
amateescu commentedHm, seems that the 7.x-2.x already had the PostgreSQL fixes applied, so in the attached patch I just uppercase some COUNTs along your (int) castings. Can you confirm that this fixes the problem on 7.x-2.x?
Comment #11
IcanDivideBy0 commentedNow, getting an issue while showing a view ordered by the queue :
Comment #12
amateescu commentedHow about now?
Comment #13
IcanDivideBy0 commentedWorks fine.
Just added a missing parenthesis in the last modified query.
Comment #14
raccer commentedSo the various GROUP BYs in 7.x-2.x (lines 615, 702, & 756 (&787, but the patch above fixed it) are killing my pager re drupal pager disappears when adding GROUP BY in sql I was thinking this might be a separate bug than above; I tried the 1475396-13-7.x-2.x.patch but the first 3/4 hunks failed. I'm new to patching so... amidoinitrite? Should I file a new bug? Thanks!
Comment #15
drifter commentedRerolling patch #13, it now applies to 2.x-dev and works fine with postgres. Can we get it committed?
Comment #15.0
drifter commentedformatting error again
Comment #16
fizk commentedI'm not able to reproduce this error using the latest 7.x-2.x-dev. If this issue still effects anyone, please describe how to reproduce this issue.
Comment #17
fizk commentedIf this issue still effects anyone, please reopen and describe how to reproduce.