Closed (fixed)
Project:
CAPTCHA
Version:
5.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2007 at 16:27 UTC
Updated:
4 Sep 2007 at 03:23 UTC
Jump to comment: Most recent file
Comments
Comment #1
Paul Natsuo Kishimoto commentedI just installed 5.x-3.x-dev, and it seems this is still relevant after the rewrite. The correct response to the first captcha reappears in the text field, but a new captcha (image_captcha) is displayed with the preview. The user is forced to correctly answer the second captcha as well in order to post their comment.
Blogger also has this behaviour and I find it highly annoying. It would be great if it could be avoided in Drupal.
Comment #2
wundo commentedComment #3
bryansd commented+1 on this idea. Have a number of users at my site (ie http://cmsreport.com/node/1087#comment-2196 ) complaining at the end of their comments about perceived problems with captcha. Overall though...version 3 is still a big plus over previous versions.
Comment #4
soxofaan commentedI looked into this problem and it seems difficult to solve it in a clean way (not adding to much extra code that polutes the current code).
I found a hackish but contained workaround however. The idea is to solve the captcha and hide it with CSS when the comment is previewed. For those who are interested:
captcha_pre_render($form_id, $form)incaptcha.module, change this signature tofunction captcha_pre_render($form_id, &$form) {(add prefix&to$form)I won't supply this as patch, because I think this code should not make it in the official branch.
Comment #5
soxofaan commentedThere is already a way to do this: disable the 'Persistent captchas' option on the captcha settings page. As the description of this option says:
I think this makes this issue not 'critical' anymore.
Comment #6
soxofaan commentedThe patch from issue http://drupal.org/node/165530 should make this better (it empties the captcha text field).
What do you find annoying? That a new captcha is generated (you want the same captcha challenge for each preview)? Or that there you have to solve a captcha on each preview/submit?
In the latter case: disable the 'persistent captchas' option, see #5 (http://drupal.org/node/156503#comment-285563)
Comment #7
Paul Natsuo Kishimoto commented... only this doesn't have the intended effect. To be explicit: when 'Persistent captchas' is off, the captchas do disappear, for both authenticated and anonymous users, once a form has been submitted. If both the 'Preview comment' and 'Post comment' buttons are available, correctly solving the captcha and clicking 'Post comments' results in no captcha being shown when adding subsequent comments. This is as it should be.
However, if the 'Post comment' button is not available, or a user elects to click 'Preview comment', then—because the form has not been 'fully' submitted, or for some other reason—a new captcha appears with the preview, even if the first one was answered correctly. This is contrary to the description of the 'Persistent captchas' option.
Hopefully that clarifies the source of 'annoyance' vis-a-vis #6. If a visitor to my site correctly solves one captcha, I do not want to penalize careful editing and forcing him or her to repeatedly solve new captchas on each preview. I agree that this issue is non-critical, but it remains unfixed.
Comment #8
soxofaan commentedThanks for this clarification. I made a patch that should solve this issue of persistence+previewing. Now "non-persistence" works with previewing of comments and nodes.
The problem with previewing is that new form is generated *before* the submission and captcha are validated. Consequently a captcha is added to the new form even if the captcha from the previous form was correctly answered. With this patch, the captcha is removed again in the pre_render phase (which happens *after* validation). This only happens when persistence is off of course.
Comment #9
soxofaan commentedComment #10
soxofaan commentedI updated the patch from #8 (http://drupal.org/node/156503#comment-285642)
to make it against captcha.module version 1.42.2.15
Comment #11
Paul Natsuo Kishimoto commentedApplied the patch and Captcha now works as advertised; setting RTBC. Thanks for the quick fix, soxofaan!
Comment #12
wundo commentedThanks,
Committed!
:)
Comment #13
(not verified) commented