I've installed and enabled a views module to allow testing it, but as soon as I enabled it sorting order of taxonomy listings switched to ascending (oldest first), which is rather counterproductive. To fix this I overrode the default taxonomy_term view to get descending order. However, it does not work. When I try to access any taxonomy URL, I get errors similar to following:

    * warning: pg_query(): Query failed: ERROR: syntax error at or near "ON" at character 24 in /var/www/test/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT count( DISTINCT ON (node.nid) node.nid) FROM prefix_node node LEFT JOIN prefix_term_node term_node ON node.nid = term_node.nid LEFT JOIN prefix_term_hierarchy term_hierarchy ON term_node.tid = term_hierarchy.tid LEFT JOIN prefix_i18n_node i18n ON node.nid = i18n.nid WHERE (i18n.language ='fi' OR i18n.language ='' OR i18n.language IS NULL) AND ( (node.status = '1') AND (term_node.tid = '103') ) in /var/www/test/includes/database.pgsql.inc on line 144.

That is, the syntax is completely messed up. In addition to Drupal 5.1 the site is running Apache 1.3.33, PHP 4.3.10 and PostgreSQL 8.1.8. I'm also running few other more sophisticated contributed modules: CCK, i18n and Taxonomy_access.

Comments

plj’s picture

Whoops, I just realised that along i18n, there is a module called i18n_views. However, enabling that does not seem to fix this bug. (I did clear views cache.)

Anonymous’s picture

Status: Active » Closed (duplicate)

see http://drupal.org/node/128846 for takashi's patch that fixes this bug (which is in core, not views)

plj’s picture

Yay, that fixed it. Thanks!