Problems after updating to 1.7

Thomas_M - November 9, 2009 - 16:04
Project:Bibliography Module
Version:6.x-1.7
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Hi,
I was updating Drupal from 6.13 to 6.14 and at the same time Biblio from 1.6 to 1.7

My records are still there but I can see the list any more, instead I see "No Items found".

In the red box is writen:

* warning: pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list in /var/www/htdocs/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT DISTINCT(n.nid), bt.name as biblio_type_name FROM node n left join biblio b on n.vid=b.vid inner join biblio_types bt on b.biblio_type=bt.tid WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) AND ( n.type='biblio' )ORDER BY b.biblio_year DESC, b.biblio_date DESC LIMIT 25 OFFSET 0 in /var/www/htdocs/modules/biblio/biblio.pages.inc on line 87.

What can I do to fix this problem without recovering the old page?

Thanks in advanced

Thomas

#1

Thomas_M - November 9, 2009 - 16:23

Ok found the problem:

Postgres does not like SELECT DISTINCT and ORDER BY together.

biblio.pages.inc line 111

I changed
$selects[] = "DISTINCT(n.nid)";

to

$selects[] = "(n.nid)";

and the list appeared again

 
 

Drupal is a registered trademark of Dries Buytaert.