Using the latest queue.module ($Id: queue.module,v 1.82 2003/07/17 22:48:15 dries Exp $) from the cvs I get the folowing error when adding a blog.

warning: pg_exec() query failed: ERROR: pg_atoi: error in "blog": can't parse "blog" in /usr/local/lib/php/DB/pgsql.php on line 171.

user error: DB Error: unknown error
query: SELECT n.*, u.uid, u.name FROM node n LEFT JOIN users u ON u.uid = n.uid WHERE n.nid = 'blog' in /usr/local/apache/drupal/includes/database.pear.inc on line 76.

Comments

killes@www.drop.org’s picture

This query is in node_load().

killes@www.drop.org’s picture

I cannot reproduce this bug. Can you provide more details?

dries’s picture

I can't reproduce this either. In addition, I checked all occurences of node_load() in the queue module but couldn't spot one that is obviously incorrect. Note that I committed some queue module improvements last week so maybe it got fixed. Please explain how to reproduce the problem or we'll close this bug report.

erwin’s picture

I'm logged in as admin user and after adding a blog I get the message.
An example link is http://drupal.dyndns.org/?q=node/add/blog&iid=344069
After pressing the above link I get the following message.

warning: pg_exec() query failed: ERROR: pg_atoi: error in "blog": can't parse "blog"
in /usr/local/lib/php/DB/pgsql.php on line 171.

user error: DB Error: unknown error
query: SELECT n.*, u.uid, u.name FROM node n LEFT JOIN users u ON u.uid = n.uid WHERE n.nid = 'blog' in /usr/local/apache/drupal/includes/database.pear.inc on line 89.

If I press the submit button the error is gone and the page is shown correctly.

i hope this information will get you any further.

moshe weitzman’s picture

From your example, that query looks like it should be n.type='blog' or
n.nid=$node->nid at the end. I haven't looked at the module but the
query is obviously wrong as written.

dries’s picture

Of course the query is wrong but last time I tried it, I couldn't reproduce Erwin's problem.

Erwin, do you get any other errors or just this one? Do you run modules from the contributions repository? Does your node table have a path field and do you happen use Drupal's new URL aliasing functionality?

dries’s picture

Priority: Critical » Normal