"You can't request more than @num challenges without solving them..."
| Project: | CAPTCHA |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | soxofaan |
| Status: | closed |
I just recently witnessed a strange error message popping up in one instllation every now and then: "You can't request more than @num challenges without solving them. Your previous challenges were flushed."
In my case it was actually "You can't request more than 20 challenges without solving them..." but I found that @num from the locale module..
I am actually not 100% sure if this is a CAPTCHA related thing - but I somewhere (http://scottsigler.com/node/639) found a hint that it might be CAPTCHA related - and "challenge" seems to be a typical CAPTCHA-term.. so I thought I first try here. Of course it could also be any other module and since that website uses some modules (five star, top node, comment notify, etc) it is not easy for me..
..I hope somebody can tell me what this is about - and how/ where I can edit the setup so that thie "error" is not shown anymore..?
thanks in advance! greetz! till..

#1
Anonymous browsing of a site can result in this error message.
To replicate:
1) Ensure that the comment form is displayed on every node.
2) Ensure that captcha is displayed on the comment form.
3) Browse 20 pages on the site.
To remove the error message, simply disable the drupal_set_message in captcha.module.
Is there a better, long-term solution for this issue?
#2
First: it is indeed a CAPTCHA thing
Second: the flushing of challenges is meant to avoid unlimited filling of your sessions database table. Every time a challenge is requested/displayed, an challenge entry (with the challenge solution) is added to the session of the user, for validating after form submission. If you have a lot of users (and spammers), this can lead to a session table growing too big. By default, the CAPTCHA module flushes all solutions when there are 20 unsolved entries in the session.
You can change this threshold in the source code at the top of captcha.module:
<?phpdefine('CAPTCHA_UNSOLVED_CHALLENGES_MAX', 20);
?>
There is no option in the CAPTCHA admin gui for this (yet)
Third: it is not recommended to have a setup where there is a CAPTCHA on every page view. From the CAPTCHA help page:
#3
This happens to me on groups.drupal.org from time to time.
#4
Shall we please just remove displaying of this annoying message? It doesn't look out good, user is notified of something he didn't cause in any way.
If CAPTCHA is needed, such as on my website, on almost every page, then OK, we will simply loose caching. On small sites it is not a problem, but displaying annoying message of unknown origin to innocent user we may call a problem :-)
#5
What precisely do you request?
#6
I like the first option of not showing the message but still flushing the challenges.
#7
Another solution would be to flush only the oldest challenges. That would mean a FIFO design instead of the current 'flush everything when full'. Then the message is not needed anymore.
#8
this patch implements the idea of #7
#9
Works for me.
#10
Works for me, too. Thanks!
#11
I've the same problem with this error. I've downloaded the patch, but I don't know how I can apply this patch?
Do I have just to copy the new code over the old one?
Thanks for your help!
Edit: I've just copied the code over the old one and everything is fine! Thank you guys, the problem is solved! :)
#12
fixed for 5.x-3.x by http://drupal.org/cvs?commit=101161
#13
fixed for 6.x.1.x by http://drupal.org/cvs?commit=101170
#14
Automatically closed -- issue fixed for two weeks with no activity.