I've got the following problem on drupal 4.3 (final) whe trying to access the url -> node/add/page

--
warning: PostgreSQL query failed: ERROR: pg_atoi: error in "page": can't parse "page"
in /usr/share/pear/DB/pgsql.php on line 173.user error: DB Error: unknown error
query: SELECT n.*, u.uid, u.name FROM node n INNER JOIN users u ON u.uid = n.uid WHERE n.nid = 'page' in /usr/local/drupal-4.3.0/includes/database.pear.inc on line 89.
--

Environment infos:
- using Postgresql 7.2.1 on debian woody and
- apache 1.3.26.

After investigation, I've found that the probem was on function queue_block of the file queue.module:

if (arg(0) == "queue") {
$id = arg(1);
}
else {
$id = arg(2); # < - here the value "page" is assigned to id;
}
$node = node_load(array("nid" => $id)); # < - here the function node_load makes a query comparing n.nid (integer) to 'page'

[]'s

Comments

adrian’s picture

Assigned: Unassigned » vertice@www.drop.org

will take a look at it tomorrow night

adrian’s picture

I have had some free time open up and I have unsuccessfully attempted to reproduce this.

I followed the following procedure

1) Taken the latest 4-3-0 branch of drupal core
2) dumped in the database schema
3) created the conf.php file
4) created my admin user
5) go to admin/system/modules and enable the queue.module
6) go to the node/add/page screen. at this point i find no problem.
7) I create a page node, as promoted to front page, not in the queue and publish. still no error.
8) I proceed to create 5 more nodes of page/story/blog types with different content settings, still no error
9) I run the generate-content.php script and create a couple of dozen random nodes , and i modify their settings similiarly
10) i go to the queue and vote on random things.

In all this I did not see a single error , or experience a single problem.

Due to the nature of the problem however.. i am not sure that the disparity in versions of postgres has anything to do with it. I unfortunately couldn't find a 7.2 postgres box to test on aswell.

I suggest as a start you grap the latest drupal tarball and try to reproduce this error again. Currently the drupal 4.3.0 release tarball is rebuilt every night from cvs, so there might be a fix that been loaded into it since you downloaded your copy. Yes we know this is wrong =)

Please try this, and then tell us if it goes away, I don't want to mark this as fixed until I have atleast heard from you. good luck

moshe weitzman’s picture

Priority: Critical » Normal

no word from the poster ... please re-open this case if you follow the hints given and still this problem persists