Posted by mattie on September 23, 2007 at 10:27pm
Jump to:
| Project: | CAPTCHA Pack |
| Version: | 5.x-1.0-rc2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | soxofaan |
| Status: | closed (fixed) |
Issue Summary
Hi,
I quite frequently get the following error in the log:
Captcha problem: hook_captcha() of module random_captcha_type returned nothing when trying to retrieve captcha type Random CAPTCHA type for form comment_form.
When I try to access the page given with the error message, there seems no problem. Of course, it could be hard to reproduce given the random nature of the random_captcha_type ;)
Is this a known "problem"?
greetings
matthias
Comments
#1
Which CAPTCHA types are enabled in the settings of your random CAPTCHA type? (which types does the random CAPTCHA choose from?)
#2
enabled captcha's:
mmm.. now that you mention it, should I disable one of the Math captcha's? :) if yes, which one?
#3
Which version of the base CAPTCHA module do you use?
One of those challenges is the culprit. One way to find out which one is reloading your comment form several times (solving the challenges is not needed) until you know which ones successfully show up and which one does not. You can speed this process up by disabling the working challenges.
Concerning the math challenges: having them both enabled shouldn't be a problem, it just a bit silly. "Math CAPTCHA (math_captcha)" is from CAPTCHA Pack and more advanced than "Math (captcha)", which is the default simple builtin challenge of the base CAPTCHA module.
groetjes van een landgenoot.
#4
okay.. so I have activated my brain now which always turns out to be a good idea when trying to solve a problem
I tried to go back and think what I did. Then I tried to reproduce it on a local install. And jackpot we have :)
The problem is as follows:
Initially, I enabled all captcha plugins in the random captcha plugin. Then I found out that (actually to no surprise) IE6 does not correctly render the CSS captcha. Since I know some people still use that, I disabled the module. I checked the random plugin config and saw the css plugin disappeared and the 10 random generated captcha's looked okay, so I figured everything was ok. I have now the impression though that the random plugin still references the CSS plugin for randomness. If I enable the css module, disable it in the random plugin and disable themodule again, the problem seems solved.
To verify, I installed the latest stable versions of all on a local install. I enable random plugin with all captcha's, disable the css module. Then I let the example page generate 10 captcha's. I didn't think of it before that I wouldn't see it when one captcha fails to load, because the result is simply one captcha less on the screen! :) So counting every time, I indeed counted only 9 captcha's on approx. every 3 page reloads. When I enable css and disable as described above, I always count 10. So, maybe there is a tiny bug there? I'm only guessing as I did not have a look at the code.
Thanks for the great work you put in the captcha modules, to me, it's essential!
groetjes van een leeftijdsgenoot (we schelen 9 dagen! :))
#5
it is indeed a bug
should be fixed by http://drupal.org/cvs?commit=82155
slaapel
#6
that's great!
thanks
#7