Closed (fixed)
Project:
Subscriptions
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
5 Sep 2006 at 22:41 UTC
Updated:
22 Nov 2006 at 02:15 UTC
Jump to comment: Most recent file
This module is not working in a postgreSQL environment yet. Here is the error I get when I post a comment onto a subscribed node:
* warning: Invalid argument supplied for foreach() in /usr/share/drupal/modules/node.module on line 359.
* warning: implode() [function.implode]: Bad arguments. in /usr/share/drupal/modules/node.module on line 363.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at end of input at character 317 in /usr/share/drupal/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /usr/share/drupal/includes/database.pgsql.inc on line 103.
* warning: Invalid argument supplied for foreach() in /usr/share/drupal/modules/node.module on line 359.
* warning: implode() [function.implode]: Bad arguments. in /usr/share/drupal/modules/node.module on line 363.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at end of input at character 317 in /usr/share/drupal/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /usr/share/drupal/includes/database.pgsql.inc on line 103.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "124" does not exist in /usr/share/drupal/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT tid FROM term_node WHERE nid = "124" in /usr/share/drupal/includes/database.pgsql.inc on line 103.
* warning: Invalid argument supplied for foreach() in /usr/share/drupal/modules/node.module on line 359.
* warning: implode() [function.implode]: Bad arguments. in /usr/share/drupal/modules/node.module on line 363.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at end of input at character 317 in /usr/share/drupal/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /usr/share/drupal/includes/database.pgsql.inc on line 103.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | subscriptions.module.cvs_20061020.pgsql.patch | 497 bytes | PMunn |
| #10 | subscriptions.module.4.7.0.20060909.pgsql.patch | 519 bytes | PMunn |
| #6 | subscriptions.module_3.patch | 862 bytes | JamieR |
| #4 | subscriptions.module_2.patch | 488 bytes | Steve Simms |
Comments
Comment #1
dziemecki commentedAre you using the code I checked in last night?
Comment #2
dboune commentedThis feels like a kludge.. Why we are alternately receiving objects or arrays (or sometimes just nothing), I do not know.. but this fixes it for the time being, and hopefully exposes the real issue to someone who knows better than I.
Also, note the first change in the diff. Postgres doesn't like double quotes around values.
Thanks,
Damian
Comment #3
JamieR commentedHi, Damian's patch has been working now without problem for a few days. Seems this issue may have been sorted out. I did upgrade to the latest distribution of the module - and the problem persisted. The patch was written for the latest 4.7 release. I hope this helps others - this module is an invaluable part of drupal. Thanks for all your work on it!
Jamie.
FYI, Damian and I work together.
Comment #4
Steve Simms commentedI just ran across the quoting problem that was mentioned above as well. Attached is an alternative patch, reversing the quotes rather than escaping them, which may be a little easier to read.
(Strictly speaking, since the nid should always be an integer, the quotes should be unnecessary in the first place, so that could be another possibility.)
Comment #5
sammys commentedHi all,
This is a module, but I stumbled on this page through the issue queue. I'm of the mind that the variable be changed to %d and quotes removed. Please adjust this and i'll review the patch. I recommend always using double quotes around queries.
Cheers,
Sammy Spets
Synerger
http://synerger.com
Comment #6
JamieR commentedModified patch attached.
Comment #7
dziemecki commentedWhich version of the module is this patch against? Something like the patch listed at the top was already committed.
Comment #8
JamieR commentedIt was against the version that was commited on the night of Sept 5th... I'm not at work currently so I can't look at the file. Thanks!
Comment #9
sammys commentedThe patch is broken and doesn't apply. Please resubmit the patch with the proper unified patch header.
Comment #10
PMunn commentedI ran into this, fixed it in 4.7.0, and fixed it (untested) in cvs.
The 4.7.0 patch based on the 2006-09-09 version is here...
Comment #11
PMunn commentedAnd here is the cvs patch based on the 2006-10-20 cvs version:
Comment #12
dziemecki commentedCorrected code committed.
Comment #13
PMunn commentedThank you. This latest 4.7.0 works for my postgresql install.
Comment #14
(not verified) commented