Hello there,
Some days ago I got an error on updating my webform report's name, that's below:
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'Relatório: Clientes PF' for column 'wnid' at row 1: UPDATE {webform_report} SET description=:db_update_placeholder_0, wnid=:db_update_placeholder_1, columns=:db_update_placeholder_2, sorton=:db_update_placeholder_3, filters=:db_update_placeholder_4, options=:db_update_placeholder_5 WHERE (nid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => Relatório: Clientes PF [:db_update_placeholder_2] => a:4:{i:0;a:4:{s:3:"cid";i:15;s:6:"format";s:0:"";s:6:"option";s:0:"";s:6:"hidden";i:0;}i:1;a:4:{s:3:"cid";i:2;s:6:"format";s:0:"";s:6:"option";s:0:"";s:6:"hidden";i:0;}i:2;a:4:{s:3:"cid";i:3;s:6:"format";s:0:"";s:6:"option";s:0:"";s:6:"hidden";i:0;}i:3;a:4:{s:3:"cid";i:4;s:6:"format";s:0:"";s:6:"option";s:0:"";s:6:"hidden";i:0;}} [:db_update_placeholder_3] => a:0:{} [:db_update_placeholder_4] => a:1:{i:0;a:3:{s:5:"field";i:14;s:4:"type";s:1:"7";s:5:"value";s:0:"";}} [:db_update_placeholder_5] => a:5:{s:16:"results_per_page";s:2:"20";s:8:"hide_csv";i:0;s:11:"search_form";i:1;s:6:"layout";s:6:"REPORT";s:8:"php_code";s:0:"";} [:db_condition_placeholder_0] => 3 ) em webform_report_update() (linha 322 de /home/devanide/public_html/webway.eti.br/extranet/sites/all/modules/webform_report/webform_report.module).
So, I fixed that, by editing line 315 from webform_report.module.
Then: 'wnid' => $node->wnid,
Now: 'wnid' => $node->nid,
Worked for me (using Drupal 7.10), did something wrong?
Well, just for next release.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | webform_report_PDO_update_webform_report.patch | 545 bytes | k3vin_nl |
Comments
Comment #1
rschwab commentedChanging status so this issue doesn't go -poof- in a few days.
Comment #2
sea4 commentedHi, when i tried making the change. i lost all the setting for that report. somehow it seems to lost the reference to the webform so just standard fields show up.
Comment #3
jimbullington commentedThat change would not work wnid is the nid of the webform node.
I'm not getting that error on my test rig. I assume y'all are using the latest 7.1-dev version? What version of PHP are you using? Also what database?
Would it be possible to put in a printr() or dpm() (if devel is installed) to display $node at webform_report_update() before the db_update() call?
Thanks!
Comment #4
k3vin_nl commentedI have the same problem. Below is the var_dump of the node (from webform_report_update() )
It looks like the webform name is used instead of an numeric id?
Comment #5
k3vin_nl commentedAlso when editing the node, I see the webform name instead of the wid!
Comment #6
k3vin_nl commentedI simply removed the wnid from the update function. If it can't be changed there is no point in having it in the update function?
Comment #7
jimbullington commentedExcellent suggestion - patch has been pushed to repo - Thanks!