I just upgraded to the newest version of webfm, 6.x-2.13, and I now get the following error

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for integer: "nid" in /var/www/drupal-6.20/includes/database.pgsql.inc on line 139.
    * user warning: query: SELECT fid FROM webfm_attach WHERE 'nid' = 1034 ORDER BY weight in /var/www/drupal-6.20/sites/intern.hpc2n.umu.se/modules/webfm/webfm.module on line 3087.

whenever I save a page that has webfm-links in it.

I use: Drupal 6.20

The error does not seem to cause problems, except it is thrown every time I save the pages, and it makes me nervous ;)

Any idea what is going on?

Comments

cgmonroe’s picture

You're using PostgreSQL right? Which version?

I'm not too familiar with that SQL server type but I have seen that it can be picky about it's syntax. But I can't see any of the problems a google search came back with dealing with the syntax of the SELECT statement or the integer type. It's not inside quotes, it's not null, it looks like a valid query/integer to me.

What happens if you copy try to run that select statement in a PostgreSQL tool?

Only minor thing I can think of doing is to trying to remove the single quotes around the column. E.g. line 3086 would look like:

 $query = "SELECT fid FROM {webfm_attach} WHERE %s = %d ORDER BY weight";

But that's really grasping at straws... since it isn't supposed to be an integer..

nhck’s picture

Version: 6.x-2.13 » 6.x-2.15
Status: Active » Postponed (maintainer needs more info)

I found that single quotes are not allowed around column names in posgresql - so I chaned this in 6.x-2.15. Hope it works?

roball’s picture

Version: 6.x-2.15 » 6.x-2.13
Status: Postponed (maintainer needs more info) » Fixed

The problem was in 2.13 and seems to have been fixed in 2.15.

bbrydsoe’s picture

Version: 6.x-2.13 » 6.x-2.15
Status: Fixed » Postponed (maintainer needs more info)

Yes, I am using PostgreSQL. Version 8.3.14.

The change in webfm 6.x-2.15 worked! Thanks so much for a very quick fix!

roball’s picture

When the bug has been fixed, why do you set the status back to postponed?

bbrydsoe’s picture

Status: Postponed (maintainer needs more info) » Fixed

Sorry. I didn't see that status was automatically set to postponed when I posted - thought it would have stayed on fixed ?
I didn't make a change to the status box, just left it, assuming it would stay on the current one (fixed) - apparently it didn't. It says fixed in the status box now - hopes it stays that way...

roball’s picture

Version: 6.x-2.15 » 6.x-2.13

Thanks for re-setting the correct status. Sometimes Drupal.org's tracking system behaves strange.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.