Hello,

I got the following error message while adding a new webform on the path (nl/node/add/webform):

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "add" LINE 4: WHERE (nid = 'add') ^: SELECT uwp.nid AS nid FROM {uc_webform_pane} uwp WHERE (nid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => add ) in uc_webform_pane_nodestatus() (regel 151 van /var/www/htdocs/dev/nieuwsovon/sites/all/modules/contrib/uc_webform_pane/uc_webform_pane.module).

Can be fixed at line 149 of the uc_webform_pane.module:
Orig: ->condition('nid', $nid)
New:
->condition('nid', (int) $nid)

CommentFileSizeAuthor
#2 integer-2000706-2.patch615 bytesallartk

Comments

arski’s picture

Not sure how converting the string "add" to int would really fix the problem? should rather fix the underlying issue.. what version of webform are you using?

allartk’s picture

StatusFileSize
new615 bytes

I use webform 7.x-3.18 . After looking more precisely, the value comes from line 62/63 in uc_webform_pane.module:

$nid = arg(1);
if (uc_webform_pane_nodestatus($nid)) {

The patch solves it with is_int($nid)

arski’s picture

Status: Active » Needs work

Hm, again, while eliminating the error, this does not solve the underlying issue that this should not be occurring in the first place.

hynnot’s picture

I have the same problem. But I don't use ubercart...

Maybe is a problem of Drupal with Postgres?

I have this problem when I try add a content, unless the administrator user.

I found this solves my problem: https://drupal.org/node/1003788#comment-6110312

arski’s picture

sorry guys, but I'm afraid I don't have the time to maintain the module anymore - so hopefully someone will volunteer to take over.