Closed (fixed)
Project:
CAPTCHA
Version:
6.x-2.1
Component:
Captcha API (captcha)
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
7 Feb 2010 at 01:19 UTC
Updated:
19 May 2010 at 22:02 UTC
Fatal error: Call to undefined function captcha_set_form_id_setting() in ...../modules/captcha/captcha.admin.inc on line 246
Comments
Comment #1
soxofaan commentedHow did you get this error? Please provide steps to reproduce
The line from the error message is inside function
captcha_admin_settings_submit(), which does not include the required include file (captcha.inc) itself, because this one is included by form builder functioncaptcha_admin_settings(). Normallycaptcha_admin_settings()should always be run beforecaptcha_admin_settings_submit(), so this problem should not manifest itself.Comment #2
Observer123 commentedI received it when submit changes in captcha settings. Was resolved entering the captcha_set_form_id_setting source code in captcha.admin.inc. Not sure is that right, but problem been resolved. I am new to php programing :)
Comment #3
soxofaan commentedI can't reproduce this. Can you describe your setup? E.g. what other modules are you using?
Note that the 6.x-2.1 version is already released for more than a month now and there are already more than 17000 users at the time of this writing (http://drupal.org/project/usage/672304). If the problem you mention is caused by the CAPTCHA module on its own, it would be reported much earlier and would be highly critical.
But since this is not the case, I suspect there is something wrong on your setup outside the CAPTCHA module.
This is not the right way to solve this, as captcha_set_form_id_setting is now defined in two places: captcha.inc and captcha.admin.inc, it's better to include or require (http://php.net/manual/en/function.require.php) captcha.inc .
But even that is not a real solution for your problem (you're just hiding the problem, not solving it)
Comment #4
brianmercer commentedAlso having this problem.
It must have to do with my pseudo http://drupal.org/project/securepages setup that I'm doing through server rewrites. Normal pages are HTTP and admin pages are redirected to HTTPS. I expect that the POST is HTTP and not surviving the rewrite. My other sites which are totally HTTP or totally HTTPS do not have this problem on the same server.
Sort of an edge case, but I've run into very few problems with other modules.
Comment #5
brianmercer commentedOK, ignore that last post. I took out the HTTPS rewrites and it still does it. I'll keep looking.
Comment #6
brianmercer commentedIt was the http://drupal.org/project/form module. Form seems to be causing lots of problems, so almost certainly not a CAPTCHA issue.