I'm receiving the following error when viewing a node that is eligible to be in a nodequeue:
PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Column 'nodequeue_subqueue.qid' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.: SELECT s.*, COUNT(n.position) AS count, s.sqid AS _field_0 FROM {nodequeue_subqueue} s LEFT OUTER JOIN {nodequeue_nodes} n ON n.sqid = s.sqid WHERE ( (( ([s].[qid] = :db_condition_placeholder_0) AND ([s].[reference] IN (:db_condition_placeholder_1)) )) ) GROUP BY s.sqid; Array ( [:db_condition_placeholder_0] => 5 [:db_condition_placeholder_1] => 5 ) in nodequeue_load_subqueues_by_reference() (line 794 of C:\development\fas\docroot\sites\all\modules\contrib\nodequeue\nodequeue.module).
This is due to the stricter requirements SQL Server has for GROUP BY clauses. Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1992262-1-nodequeue_support_sqlsrv_aggregation.patch | 598 bytes | azinck |
Comments
Comment #1
azinck CreditAttribution: azinck commentedPatch attached. We could alternatively solve this using subqueries but I think this patch is a bit simpler.
Comment #2
azinck CreditAttribution: azinck commentedComment #3
azinck CreditAttribution: azinck commentedMore details here: http://stackoverflow.com/questions/6456727/column-is-invalid-in-the-sele...
Comment #4
tbaumgard CreditAttribution: tbaumgard commentedI'm not sure that adding code specifically for SQL Server, or any other database software for that matter, should be added to this module. Something like that probably belongs in the database abstraction layer instead. However, I thought I'd confirm for those who have no other option that this patch makes Nodequeue (at least up to 7.x-2.1) work with SQL Server.
Comment #6
jenlamptonMerged into 7.x-2.x.