Got these errors when clicking the Image galleries on the breadcrumb link
* warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for integer: "" . in /includes/database.pgsql.inc on line 125.
* user warning: query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, 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 drupal.node n INNER JOIN drupal.users u ON u.uid = n.uid INNER JOIN drupal.node_revisions r ON r.vid = n.vid WHERE n.nid = '' in /includes/database.pgsql.inc on line 144.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for integer: "" . in /includes/database.pgsql.inc on line 125.
* user warning: query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, 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 drupal.node n INNER JOIN drupal.users u ON u.uid = n.uid INNER JOIN drupal.node_revisions r ON r.vid = n.vid WHERE n.nid = '' in /includes/database.pgsql.inc on line 144.
Does anyone got the same problem? Know how to fix these problems?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | image_133044.patch | 1.45 KB | drewish |
Comments
Comment #1
drewish commentedi can't seem to find any queries in any of the image modules that looks like that. could you provide some more info? perhaps a link?
Comment #2
drewish commentedComment #3
herni7881 commentedChoosing : Administer > Content Management > Image galleries ; will list all the galleries available.
Let say I choose Gallery A, it will list all images from Gallery A.
The breadcrumb showing : Home › Image galleries.
When clicking the 'Image galleries' link on the breadcrumb, the mentioned errors would occur.
Sorry cant provide any link. btw, sorry 4 the late reply
Comment #4
aacraig commentedI get the same warning:
I have tried a little to track down the offending bit, but am not familiar enough with the system to find it. It looks to me like it's trying to look up data for galleries with no images. In fact, if I remove all galleries with 0 images (either by deleting them or putting at least one image in them), the warning disappears.
Comment #5
fidot commentedIn which case, my guess would be use of %s rather than %d for n.nid in the WHERE clause.
Please note that I haven't looked at the code - it's just seems likely to me.
Hope that helps someone track it down.
Terry
Comment #6
drewish commentedyeah, the %s shouldn't be used for the IN query... i'll have to look around and see what the correct way to do that is.
Comment #7
drewish commentedhere's a patch. please test it out.
Comment #8
drewish commentedcommitted to HEAD and DRUPAL-5.
Comment #9
(not verified) commented