You can see the error when you try submitting this form: http://biblio.csusm.edu/forums/web-development/website-feedback

"CAPTCHA validation error: unknown CAPTCHA session ID. Contact the site administrator if this problem persists."

Click the submit button a second time and the form submits.

Submitted issue to CAPTCHA project butno answers as yet: http://drupal.org/node/632742

I don't think it's a CAPTCHA problem because when I click submit the second time, CAPTCHA works. Also, I think the problem started when I updated to Web Form 3.x

CommentFileSizeAuthor
#14 webform_validation_captcha.patch1.12 KBquicksketch

Comments

quicksketch’s picture

Category: bug » support
Status: Active » Closed (won't fix)

A bug in captcha is not a bug in Webform. Submitting the same issue to an unrelated module queue isn't going to get it fixed.

ianchan’s picture

Title: CAPTCHA fails » Webform not working with CAPTCHA
Status: Closed (won't fix) » Active

Sorry for changing this back to active. I'm going to try and word my issue title & description a little better this time. If you want me to re-submit a new issue, let me know.

Summary:
CAPTCHA is working but Webform is possibly interfering with the confirmation of successful CAPTCHA submission.

Problem description:

1. When I initially submit a webform that includes a captcha, the form does not submit and returns this error "unknown sid" (this is referring to the captcha_sid). However, when I look at the post data using Firebug, the sid is in there.

2. When I resubmit the same form, I do not need to fill in the captcha information because it was already successful (I verified this by looking at the captcha MySQL table) and the captcha form has already disappeared from the page. However, the captcha_sid remains in the post data and the form submits successfully as a result.

So, I think when the webform is initially submitted, the captcha form data is sent to the captcha module but the returned validation (from the captcha module) isn't recognized by webform.

Hope this description is a little more understandable. Thanks for your help!

ianchan’s picture

FYI - I tested CAPTCHA on the user login form on it works there.

ianchan’s picture

FYI -
http://drupal.org/node/632742#comment-2687754 - downgrading to older version of webforms allows captchas to work.

quicksketch’s picture

quicksketch’s picture

Category: support » bug
Priority: Critical » Normal
aiphes’s picture

but downgrade is not all time possible...because the latest version allow using of webform conditionnal submodule..

anon’s picture

I dont know if this is gonna solve this issue, but take a look at #745106: CAPTCHA validation error: unknown CAPTCHA session ID.

ianchan’s picture

@quicksketch, please consider upgrading the urgency of this issue. We are using the WebForms module, with CAPTCHA, for six forms on our site and this issue is causing problems for a number of our users. Thank you.

quicksketch’s picture

Webform is in BETA for a reason. :P

I've got more pressing issues, I don't use Captcha, and I'm not yet using Webform 3 at all for production purposes, so this will get fixed A) in a later beta or RC or B) if a patch is provided.

luthien’s picture

Version: 6.x-3.0-beta2 » 6.x-3.0-beta1
Status: Fixed » Active

any guide on how to revert the module and forms designed in 3.0 back to the previous version? I made the mistake of upgrading to 3.0 for the production site, the latest version has some nice features, but it breaks others. Among the many problems I found after upgrade are:

1) email subject can not be changed to the values I specified unless there is a new way of doing that I'm not aware off. (Fixed with Webform 6.x-3.0-beta2 - only problem is size of subject input box not big enough for long subjects)
2) custom email themes not working as it was before since the API changed. Before upgrade, I was able to style the form display, results, and confirmation emails. Now it is not working as it should be. (got it to work by disabling the editor and after upgrading to Webform 6.x-3.0-beta2)
3) captcha is not working but it works fine for the rest of the modules like contact. (Patch from this post solved captcha problem)
4) Unable to add PHP code to populate a drop down select. I was using the dynamic select patch from http://drupal.org/node/151603. (new patch for dynamic select for Webform 6.x-3 worked fine)

My mistake for upgrading and using it in a production site. Otherwise, the webforms module is very flexible. Planing on using it to create a survey once I figure out how to revert to previous version without breaking the forms already there. (I will continue using the latest version, it is almost perfect for what I need).

quicksketch’s picture

See #721662: Downgrading Webform causes "warning: Invalid argument ..." in Form components for some other users' experience with downgrading. If you have existing webforms however, you'll find it's very difficult to downgrade.

aiphes’s picture

yes , after downgrading i've must delete in database the node of my webform which didnt work..longtime spent but now i think it's functionnal...so captcha will work again

quicksketch’s picture

Version: 6.x-3.0-beta1 » 6.x-3.0-beta2
Status: Active » Fixed
StatusFileSize
new1.12 KB

@anon: Thanks for posting your findings in #745106: CAPTCHA validation error: unknown CAPTCHA session ID. . I think you hit it right, Webform triggers validation twice on all non-Webform elements. Since Webform hadn't been anticipating another module adding a field like this, it was triggering validation twice. We did some special handling to validations to make it so you could click "Back" in multi-page forms without filling out required fields.

This patch should correct the problem, I've tested it with Captcha 2.x (before and after making this change), and it has fixed it. Committed to both 3.x branches.

luthien’s picture

The patch is working fine for Webform 6.x-3.0-beta2 but I have a small problem. The captcha appears after the Submit button instead of before.

towlie’s picture

Version: 6.x-3.0-beta1 » 6.x-3.0-beta2
Status: Active » Fixed

same problem here...

solserpiente’s picture

Captcha disappears after validation. High probability of spam.
Suscribe

Status: Fixed » Closed (fixed)

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

Dublin Drupaller’s picture

same problem here guys (patch #15 has been applied)

tjmoyer’s picture

If your watchdog error message I had is something like "CAPTCHA validation error: unknown CAPTCHA session ID (NULL)" I have provided a patch to CAPTCHA to resolve the differences between the posted data structure captcha expects and the posted data structure webform uses.

You can find the patch at http://drupal.org/node/632742#comment-3406540.