The SQL-Statement to count the articles seems to be wrong.
For every group at the overview-page the following error is printed:
# warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT t.tid, COUNT( DISTINCT ON (n.nid) n.nid) AS c FROM dr... ^ in /var/www/drupal/includes/database.pgsql.inc on line 125.
# user warning: query: SELECT t.tid, COUNT( DISTINCT ON (n.nid) n.nid) AS c FROM drupalterm_node t INNER JOIN drupalnode n ON t.nid = n.nid WHERE n.status = 1 GROUP BY t.tid in /var/www/drupal/includes/database.pgsql.inc on line 144.
line 125: $last_result = pg_query($active_db,$query)
line 144: trigger_error(...)
thanks.
Comments
Comment #1
msameer commentedWhich version are you using ?
Can you try to disable the recent articles box ? I guess that's the reason.
I can't promise I'll be able to solve it. Never worked with PostgreSQL before.
Comment #2
s1gg1 commentedDrupal 5.2 and 5.5
PostgreSQL 7.4 and 8.2
Article: Latest Downloadversion
The latest-articles-box shows correctly the latest articles. but by clicking on "more..." the errors occur.
This page shows the following:
Latest Articles
* article 1
* article 2
Article Categories
* cat1 (0)
o subcat1 (0)
o subcat2 (0)
The Number of articles is wrong and the sql-code tries to count it.
SELECT t.tid, COUNT( DISTINCT ON (n.nid) n.nid) ...
Comment #3
msameer commentedI have versions for drupal 4.7 and 5.x and both are the latest. Which version are you using ?
The subcategories part is using taxonomy_term_count_nodes() so no way it can be an article bug.
Comment #4
s1gg1 commentedi am using the version 5.x.
But the listing of the article categories and the count of articles in each categorie is part of the articles-module, isn't it?
thanx.
Comment #5
s1gg1 commentedok, thank you.
the error is not in the article-module.
it's a bug in the database.psql.inc, as you can see it is already beeing discussed at http://drupal.org/node/128846
Comment #6
msameer commentedThanks!
Closing this bug. Please reopen if needed.