By paulgear on
Whenever i try to insert a node into my new drupal 4.6.0 installation, i get the following error:
warning: pg_query(): Query failed: ERROR: invalid input syntax for integer: "" in .../includes/database.pgsql.inc on line 45.
user error:
query: INSERT INTO node (title, body, format, uid, type, teaser, status, moderate, promote, sticky, comment, created, changed, nid) VALUES('Test page', 'Test', '1', '2', 'page', 'Test', '1', '', '1', '', '2', '1117105967', '1117105967', '2') in .../includes/database.pgsql.inc on line 62.
warning: Cannot modify header information - headers already sent by (output started at .../includes/common.inc:384) in .../includes/common.inc on line 192.
Why is it erroneously quoting integers? The system installed smoothly and the admin account creation and changing the module settings worked fine.
Comments
PostgreSQL: nodes fail to insert on Drupal 4.6.0
Same problem is occurring in 4.6.2. Normal users cannot blog at all and these errors appearing, although it works for the admin-level user just fine.
drupal 4.6.3
i have some problem in my cms version. if anybody know how i can solve this error.
ps. this error was apeared when i install other modules in cms.
same here with 4.6.3
I have EXACTLY the same problem...
I mean, fresh install, previously i had egroupware and phpgroupware on the same server.
postgresql 7.4.7
apache 2.0.54
debian sarge
Solved the mbstring issue on the php.ini.
I'm new to drupal, but will try to understand and solve it.
Any help is gladly appretiated!
I fixed the problem,
I fixed the problem, Postgresql does not like you to insert '' for integers. MySQL diggs this and translates it to zero, Postgresql is more strict and complaints.
To fix I changed in module/node.module:
Into this:
Thus it does not add empty fields to the query. I have no idea if this is a safe way but is works for me.