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" />...
Comments
Comment #1
iva2k commentedInspecting 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.
Comment #2
iva2k commentedIt 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?
Comment #3
iva2k commentedI submitted a patch that resolves this issue here http://drupal.org/node/393592#comment-1467354.
Comment #4
soxofaan commentedfixed by
http://drupal.org/cvs?commit=196182
thanks for figuring this out
Comment #6
iva2k commentedRegression 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:
Line 62 should be returned to:
Restoring $arg3 passing to the way it was fixes the image captcha display.
Comment #7
soxofaan commentedfixed thanks
http://drupal.org/cvs?commit=252972