During update of webform module sql error appear. This error appear when there are permissions with single quotes in permission name in your database.

The way to resolve this problem it's to add addslashes() function in needed places of webform.install code. I suggest you patch which can resolve problem with single quotes in permission name during updating from previous versions.

CommentFileSizeAuthor
#6 webform_permission_escape_fix.patch1.11 KBquicksketch
#3 Screen-shot-1.jpg58.81 KBAnonymous (not verified)
#3 Screen-shot-2.jpg182.5 KBAnonymous (not verified)
#2 webform.install.patch897 bytesvitvas

Comments

quicksketch’s picture

Any idea which update caused this problem?

vitvas’s picture

StatusFileSize
new897 bytes

Here's the patch

Anonymous’s picture

StatusFileSize
new182.5 KB
new58.81 KB

The following error appeared when I updated from Webform 6.x-3.1 to 6.x-3.4. My webforms are no longer functioning after this update. This is a major bug which should be fixed as soon as possible. I'm going to apply the patch and hope this fixes the problem.

Anonymous’s picture

I applied the patch, but it did not fix the problem. I'm still getting the error. This appears to be a separate issue, so I've posted a new bug report here:
http://drupal.org/node/1003400

quicksketch’s picture

Status: Active » Needs work

Thanks for the patch vitvas. Rather than using addslashes(), the proper Drupal function is probably db_escape_string(). But in any case this is close enough I should be able to figure it out next time I'm working on Webform.

quicksketch’s picture

Version: 6.x-3.4 » 6.x-3.6
Status: Needs work » Fixed
StatusFileSize
new1.11 KB

I've committed this patch which uses the correct escaping function for MySQL queries.

Status: Fixed » Closed (fixed)

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