#191 - Postgresql and sources/blocks/main_news.php

  • By
  • Added
  • 12 views
Identifier #191
Issue type Major issue (breaks an entire feature)
Title Postgresql and sources/blocks/main_news.php
Status Completed
Handling member Chris Graham
Addon General / Uncategorised
Description Once logged in as admin I get the error:

Unfortunately a query has failed [SELECT *,p.id AS p_id FROM cms4_news p LEFT JOIN cms4_news_category_entries d ON d.news_entry=p.id WHERE (1=1 OR 1=1) AND validated=1 AND date_and_time>=1278510143 GROUP BY p.id ORDER BY p.date_and_time DESC]
Steps to reproduce

Additional information All fields to be selected in postgresql, when there is a "group by", must be
1) be in the "group by"
OR
2) be only in an aggregate function.

So the fix is either, fill up the group by's (lines 114-123 on sources/blocks/main_news.php) but, since you are selecting "*" that seems pointless unless you have complete duplicate records, which seems unlikely, and is not useful.

So the fix is to remove the group by clauses.
Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated