Image does not show in image_captcha when using random_captcha_type
iva2k - April 12, 2009 - 19:03
| Project: | CAPTCHA Pack |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Image does not show when image_captcha is invoked by random_captcha.
Problem page source has:
...
<img src="/image_captcha/%252F1239559457" alt="Image CAPTCHA" title="Image CAPTCHA" />...when not using random captcha, working page source has:
...
<img src="/image_captcha/59/1239555676" alt="Image CAPTCHA" title="Image CAPTCHA" />...
#1
Inspecting the code of image captcha, I noticed that hook captcha uses 3 arguments:
function image_captcha_captcha($op, $captcha_type='', $arg3='') {...Looking into random captcha code it is obvious that it does not pass the 3rd argument:
function random_captcha_type_captcha($op, $captcha_type='') {...... which explains the broken page source and missing image.
#2
It appears that random captcha depends on captcha API changes very much. Given that, I think that random captcha should belong to the base captcha module, instead of the captcha pack module. It will allow updating them at the same time. What do you think?
#3
I submitted a patch that resolves this issue here http://drupal.org/node/393592#comment-1467354.
#4
fixed by
http://drupal.org/cvs?commit=196182
thanks for figuring this out
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
Regression by commit #214786
Image Captcha does not show again with latest code:
CAPTCHA Pack 6.x-1.x-dev (2009-Jul-24)
CAPTCHA 6.x-2.x-dev (2009-Jul-17)
Symptoms are exactly the same as in the originating post.
Line 38 should be returned to:
function random_captcha_type_captcha($op, $captcha_type='', $arg3='') {Line 62 should be returned to:
$captcha = module_invoke($module, 'captcha', 'generate', $type, $arg3);Restoring $arg3 passing to the way it was fixes the image captcha display.
#7
fixed thanks
http://drupal.org/cvs?commit=252972
#8
Automatically closed -- issue fixed for 2 weeks with no activity.