Download & Extend

Image does not show in image_captcha when using random_captcha_type

Project:CAPTCHA Pack
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#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

Project:CAPTCHA» CAPTCHA Pack
Version:6.x-2.x-dev» 6.x-1.x-dev
Status:active» fixed

fixed by
http://drupal.org/cvs?commit=196182
thanks for figuring this out

#5

Status:fixed» closed (fixed)

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

#6

Priority:normal» critical
Status:closed (fixed)» active

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

Status:active» fixed

fixed thanks
http://drupal.org/cvs?commit=252972

#8

Status:fixed» closed (fixed)

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

nobody click here