I installed the latest image.module $Id: image.module,v 1.52 2003/07/22 15:11:12 killes Exp $ and get some errors when I go to the image module. I'm using postgres as database and checked the fields that are used in the query, they all exist in the table.
Is there anybody who can give me a hint where to look at?
warning: pg_exec() query failed: ERROR: Relation "n" does not exist
in /usr/local/lib/php/DB/pgsql.php on line 171.
user error: DB Error: unknown error
query:
SELECT created, thumb_path
FROM node n, image i
LEFT JOIN term_node t ON n.nid = t.nid
WHERE n.nid = i.nid
AND t.tid IN (92)
AND type = 'image'
AND personal = 0
ORDER BY created DESC
LIMIT 1
in /usr/local/apache/drupal/includes/database.pear.inc on line 89.
warning: pg_exec() query failed: ERROR: Relation "n" does not exist
in /usr/local/lib/php/DB/pgsql.php on line 171.
user error: DB Error: unknown error
query:
SELECT thumb_path
FROM node n, image i
LEFT JOIN term_node t ON n.nid = t.nid
WHERE n.nid = i.nid
AND t.tid IN (92)
AND type = 'image'
AND personal = 0
ORDER BY RAND()
LIMIT 1
in /usr/local/apache/drupal/includes/database.pear.inc on line 89.
warning: pg_exec() query failed: ERROR: Relation "n" does not exist
in /usr/local/lib/php/DB/pgsql.php on line 171.
user error: DB Error: unknown error
query:
SELECT created, thumb_path
FROM node n, image i
LEFT JOIN term_node t ON n.nid = t.nid
WHERE n.nid = i.nid
AND t.tid IN (91)
AND type = 'image'
AND personal = 0
ORDER BY created DESC
LIMIT 1
in /usr/local/apache/drupal/includes/database.pear.inc on line 89.
warning: pg_exec() query failed: ERROR: Relation "n" does not exist
in /usr/local/lib/php/DB/pgsql.php on line 171.
user error: DB Error: unknown error
query:
SELECT thumb_path
FROM node n, image i
LEFT JOIN term_node t ON n.nid = t.nid
WHERE n.nid = i.nid
AND t.tid IN (91)
AND type = 'image'
AND personal = 0
ORDER BY RAND()
LIMIT 1
in /usr/local/apache/drupal/includes/database.pear.inc on line 89.
Comments
Comment #1
killes@www.drop.org commentedI tried to fix these issues. Please try version 1.53.
Comment #2
erwin commentedRunning v1.53 now and get the same error messages. I see some difference in the select statement.
Let me know if I can do some more tests.
Comment #3
killes@www.drop.org commentedPlease send the error messages to me:
gerhard /at/ killesreiter dot de
Comment #4
killes@www.drop.org commentedI found an error, please try next version.
Comment #5
killes@www.drop.org commentedThis error is only relevant if you use PostgreSQL. You can circumvent it my changeing all occurrences of RAND() to RANDOM(). Are better patch will become available later.
Comment #6
erwin commentedChanging RAND() into RANDOM() works fine now. All error messages mentioned above are gone, thanks.
Comment #7
bruno commentedFollowing a patch made to update.php by Adrian, patch defining an RAND() function within PostgreSQL, it is no longer necessary to patch current CVS version of image.module.
However, for Drupal 4.2.0 users, a fix is available for the corresponding version of image.module.
Marking bug as fixed.
Comment #8
(not verified) commentedAutomatically closed due to inactivity (marked fixed for 14 days).