Postgresql report an error: "for SELECT DISTINCT, ORDER BY expressions must appear in select list".
Here is a patch correcting some queries.

diff -Naur g2/g2.module g2-new/g2.module
--- g2/g2.module 2009-11-11 18:42:37.000000000 +0100
+++ g2-new/g2.module 2011-02-01 10:46:15.270732914 +0100
@@ -612,7 +612,7 @@
? NODE_NOT_PUBLISHED
: NODE_PUBLISHED;

- $sq = 'SELECT n.nid, n.title, n.status '
+ $sq = 'SELECT n.nid, n.title, n.status, n.changed '
. 'FROM {node} n '
. "WHERE (n.type = '%s') AND (n.status >= %d) "
. 'ORDER BY n.changed DESC ';
@@ -890,7 +890,7 @@
: 'c.totalcount DESC';

$sq = 'SELECT n.title, n.nid, n.status, n.sticky, '
- . ' c.daycount, c.totalcount '
+ . ' c.daycount, c.totalcount, n.changed '
. 'FROM {node} n '
. ' INNER JOIN {node_counter} c ON n.nid = c.nid '
. "WHERE (n.type = '%s') AND (n.status >= %d) "
@@ -1966,7 +1966,7 @@

switch ($op) {
case 'load':
- $sq = 'SELECT n.nid, n.title '
+ $sq = 'SELECT n.nid, n.title, n.changed, n.created '
. 'FROM {node} n '
. "WHERE n.type = '%s' AND n.status = 1 AND n.uid = %d "
. 'ORDER BY n.changed DESC, n.created DESC';

CommentFileSizeAuthor
#1 g2_1047248.patch1.35 KBfgm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fgm’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Patch (to be ported) » Needs review
FileSize
1.35 KB

Rerolled from current version. Note that you should really be using 6.1.x-dev, not 6.1.0.

fgm’s picture

Status: Needs review » Fixed

No comment after 6 months and no problem found: assuming fixed and included in today's dev version.

Status: Fixed » Closed (fixed)

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