Download & Extend

pg_query() error after upgrade from Webform 6.x-2.10

Project:Webform
Version:6.x-3.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I'm getting following error while accessing Drupal Blocks panel:

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: operator does not exist: character varying = integer LINE 1: ... node n ON w.nid = n.nid WHERE w.block = 1 AND n.type IN (0) ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. in /usr/share/drupal6/includes/database.pgsql.inc on line 139.
    * user warning: query: SELECT n.title, n.nid FROM webform w LEFT JOIN node n ON w.nid = n.nid WHERE w.block = 1 AND n.type IN (0) in /etc/drupal/6/sites/all/modules/webform/webform.module on line 1385.

The problem seems to be in $placeholders = db_placeholders($webform_node_types) assigment.
Changing it to $placeholders = db_placeholders($webform_node_types, 'varchar') solves it.

Comments

#1

Status:active» needs review

Thanks, I'll make this change next time I'm working on Webform. We do a similar check in several places, all of them will need to be updated.

#2

Here's a patch for those of us needing a fix.

AttachmentSize
955024_2.patch 679 bytes

#3

Status:needs review» reviewed & tested by the community

Thanks, had same issue here and the patch fixed it.
DT

#4

subscribe

#5

Status:reviewed & tested by the community» fixed

This has been fixed as part of #1003228: PostgreSQL fix to db_placeholders().

#6

Status:fixed» closed (fixed)

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

nobody click here