Posted by dema502 on February 24, 2011 at 4:58pm
18 followers
| Project: | Webform |
| Version: | 7.x-3.8 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hello, I catch error
ERROR: invalid input syntax for integer: "full_html_no_break_converter" at character 120
Feb 24 12:36:51 db postgres[20130]: [4-2] STATEMENT: UPDATE webform SET confirmation_format='1'
Feb 24 12:36:51 db postgres[20130]: [4-3] WHERE (confirmation_format IS NOT NULL ) AND (confirmation_format NOT IN ('full_html_no_break_converter', 'filtered_html', 'full_html', 'plain_text', 'php_code'))
Comments
#1
I thought another user already filed this issue, but I can't find it. I don't use postGres myself so I'll need to get it installed to correct this problem. Any pgSQL users that are familiar with coding: I'd be thrilled to take a look at any patches you can offer to correct this patch.
#2
As it turns out I don't think this is exactly a PostGres issue, I think it's just circumstantial that you have already created several text formats on your site. Since these are non-numerically named, you get the error that you're describing. This patch should ensure that only numerically-named text formats are affected by update 7307.
#3
Well I still get this error (I have MySQL database)
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 2: UPDATE {webform} SET confirmation_format=:db_update_placeholder_0 WHERE (confirmation_format IS NOT NULL ) AND (confirmation_format NOT IN ()) ; Array ( [:db_update_placeholder_0] => 1 ) in webform_update_7307() (line 520 of /home3/esomscou/public_html/edentest/sites/all/modules/webform/webform.install).#4
Oh geez. You're right. Wish I hadn't rolled that 3.8 release now... We'll need to wait a while and then I'll roll a 3.9 release. This follow-up patch applies to 7.x-3.8 and will be included in the next version.
#5
Well I am sorry but applying the latest patch to 3.8 doesn't make difference.
After patching the relevant line look like this:
$query = db_update('webform')
->fields(array('confirmation_format' => $default_format))
->isNotNull('confirmation_format');
if (!empty($numeric_formats)) {
$query->condition('confirmation_format', $numeric_formats, 'NOT IN');
}
$query->execute();
}
And the error is
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 2: UPDATE {webform} SET confirmation_format=:db_update_placeholder_0 WHERE (confirmation_format IS NOT NULL ) AND (confirmation_format NOT IN ()) ; Array ( [:db_update_placeholder_0] => 1 ) in webform_update_7307() (line 520 of /home3/esomscou/public_html/edentest/sites/all/modules/webform/webform.install).#6
Hmm, I'm not sure how that's happening then. The troublesome part of the query:
(confirmation_format NOT IN ()), should not be added if it's empty. Are you sure you applied the patch to the version that you tested?#7
Am getting the same results even after both patches.
What can be done the 3.8 release?
#8
Correction to #7: What can be done up until the 3.9 release?
#9
#10
@quicksketch yes I applied the patch to 7.x-3.8.
#11
sub
#12
Applied. No working.
#13
Let's turn this into a general issue, since clearly it's not just pgSQL that's affected. As far as I can tell, installing 3.8 and applying the patch from #4 should fix the problem, but apparently it doesn't(?) Has this patch solved the problem for anyone? I'm just not sure how the problem could continue to exist (or what would fix it at this point) if the patch in #4 (applied to 3.8) does not fix the problem.
#14
I updated 7.x-3.6 to 7.x-3.7 to 7.x-3.8 on an installation with no webform content. I used drush and I did not get any error. So it seems that it only effects (at least in my case) an installation with webform nodes already created. In fact it breaks the viewing and analysis and may be more of submitted webform nodes.
#15
In addition to the errors and inability to update the db in 7.x-3.8, I followed comment #14 and tried to create a new form. However, I was unable to save it.
Have gone back to 7.x-3.7 for now.
#16
#15 my situation was that I had recently installed webform on an installation. It did not have webform module installed previously. The installation also had no content/node of type webform or other type associated with webform ever created. On this installation the update threw no error. I am now using that installation with freshly installed webform (updated to 3.8). Strangely I am able to create a new from and its components.
#17
Right, to clarify: "fresh" installs of Webform will not have a problem. Additionally installs of Webform that are upgraded from Drupal 6 the same time as Drupal core will not have a problem. The users experiencing problems are those running an earlier version of Webform for Drupal 7 and upgrading to the 3.8 (or 3.7) version(s).
Furthermore, as far as I know, using the latest code from the Git repository or running 3.8 with the patch from #4 should fix this problem entirely. But I haven't gotten any confirmation that this is the case from someone actually experiencing the problem.
#18
@quicksketch I have tried it a few times by deleting the entire sites/all/modules/webform and uploading webform-7.x-3.8 usinf ftp and then running update.php. It fails I don't know why. In this case I have created a webform for a client spending quite some time and removing webform reinstalling and recreating the form is not an option. Is there anyway I can export the form node, uninstall webform, reinstall it and import the form back.
#19
at the moment I am trialing on the dev version of the client site. The production version is running 7.x-3.6.
#20
did 3.6 ->3.8 update
got Update #7307error
applied patch from #4
db update completed successfully, everything works... so far
#21
Ok I will try once more. Doing step by step.
#22
Did the same as in comment #20. That solved the issue for me to
#23
yup patch #4 seems to get the job done (i hope ;))
#24
sub
#25
All seems to have messed up.
Here are the incidents from the beginning:
1. I was running 7.x.-3.6
2. 7.x-3.7 gets released but did not update.
3. 3.8 gets released I update it to that > run update.php > get 5 pending updates > update 7307 fails. Repeat this several times including applying patch #4 > 7307 still fails.
4 Decide to go back to 3.6 (by deleting 3.8, replacing it with 3.6 and running update.php) and attempt step by step update.
5. I then upload 3.7 run update.php I get 5 pending update including 7307. These updates also appeared in 3.8 (interesting - I don't know how these updates can be in 3.7). I click update > database update goes through no errors.
6 I the upload 3.8 and run update.php > very interestingly no updates give. I applied the patch #4 and ran update.php again. Still no updates on clicking update.php.
Now I get the following error when I click " View your previous submissions." on webform node:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'uid' in where clause is ambiguous: SELECT COUNT(*) AS expression FROM {webform_submissions} ws LEFT OUTER JOIN {users} u ON u.uid = ws.uid WHERE (nid = :db_condition_placeholder_0) AND (uid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 29 [:db_condition_placeholder_1] => 1 ) in PagerDefault->execute() (line 75 of /home3/esomscou/public_html/edentest/includes/pager.inc).Has the database update got messed during step 5 above.
#26
However I can visit and view the webform node. I have not tested other things.
#27
subscribe
#28
The patch in #4 worked for me. I had to re-run update.php, but other then that it was a simple fix. Thanks.
#29
Patch in #4 solved my update error on a MySQL site.
#30
2011.02.28 Module-Updates on the latest DEV-Version !!!!!!!!!!!
webform module
• 7307 -
• 7308 -
• 7309 -
• 7310 -
• 7311 -
•
• • Notice: Undefined index: weight in _registry_parse_files() (line 144 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/includes/registry.inc).
• Notice: Undefined index: weight in _registry_parse_files() (line 144 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/includes/registry.inc).
• Notice: Undefined index: weight in _registry_parse_files() (line 144 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/includes/registry.inc).
• Notice: Undefined index: weight in _registry_parse_files() (line 144 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/includes/registry.inc).
• Notice: Undefined index: weight in _registry_parse_files() (line 144 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/includes/registry.inc).
• Notice: Undefined index: weight in _registry_parse_files() (line 144 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/includes/registry.inc).
• Notice: Undefined index: weight in _registry_parse_files() (line 144 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/includes/registry.inc).
• Warning: Invalid argument supplied for foreach() in _block_rehash() (line 386 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/modules/block/block.module).
• Warning: Invalid argument supplied for foreach() in _block_rehash() (line 386 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/modules/block/block.module).
• Warning: Invalid argument supplied for foreach() in _block_rehash() (line 386 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/modules/block/block.module).
The following updates returned messages
webform module
Update #7307
• Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 2: UPDATE {webform} SET confirmation_format=:db_update_placeholder_0 WHERE (confirmation_format IS NOT NULL ) AND (confirmation_format NOT IN ()) ; Array ( [:db_update_placeholder_0] => 1 ) in webform_update_7307() (line 520 of /Applications/MAMP/htdocs/2011.02.15 Aurum-Marketing/sites/default/modules/forms/webform/webform.install).
#31
Hi guys, sorry I just realized that I've been a complete idiot on this issue. Despite having fixed the bug and committed the patch, I didn't push the changes into the drupal.org repository. In other words I thought I had put the changes in but I hadn't actually done anything at all. Geez, I can't believe this. A little bit of a rough start to the first release created with Git.
So... here's a patch that should actually apply to the 3.8 version that fixes the problem and that I've pushed to the drupal.org Git repository. It'll be included in 3.9.
#32
I have applied the other#4 patch and it seemed to work is there any reason to repatch? Forgive my ignorance on this issue but would it not be easier to just patch the webform.install file and re upload it somewhere so everyone doesnt have to figure out how to patch a file or fight with doing it on a windows pr hassle with the webhost issue? This is just my thought as It took me quite a while to figure out how to patch the file but the good news is I know how to it now any Thanks for all your hard work!
#33
Yes it would. I'm making sure I got it right this time and I'll be putting out a 3.9 version of the module in the next few hours (hopefully), or tomorrow at latest.
#34
quicksketch,
I am doing some testing to see if this issue affects the 6.x branch, as I have an anecdotal report from a client. I want to create test webform nodes that will trigger the update errors. What particular webform elements or settings relate to the errors mentioned in this issue?
#35
I wanted to inform that even on my installation with "fresh" installs of Webform I am getting kind of fatal error when I click "view previous submissions" link. The error page apparently shows nothing it just says
"Error
The website encountered an unexpected error. Please try again later."
and nothing else is shown. When I went to recent error log I found the following error
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'uid' in where clause is ambiguous: SELECT COUNT(*) AS expression FROM {webform_submissions} ws LEFT OUTER JOIN {users} u ON u.uid = ws.uid WHERE (nid = :db_condition_placeholder_0) AND (uid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 48 [:db_condition_placeholder_1] => 1 ) in PagerDefault->execute() (line 75 of /var/www/vhosts/ecoms.org.uk/httpdocs/includes/pager.inc).I thought fresh installs of webform are not affected in any way.
#36
@amsri: You're talking about a different issue (also fixed) see: #1074326: PDOException: SQLSTATE[23000] -- when viewing submissions
@DrewMathers: This issue doesn't affect Drupal 6 at all because this update exists only to fix the input format handling changes in Drupal 7.
#37
Patch 3 worked for me.
#38
I was wondering when is 7.x-3.9 getting released.
#39
Patch Applying both Patch 2, then Patch 3 worked for me.
#40
Sub
#41
Automatically closed -- issue fixed for 2 weeks with no activity.