After being alerted that the Captcha was not allowing guests to register and use the contact form. According to a guest, the captcha stated their text entered was wrong though it was correct. When I accessed my site not logged in, there was a red alert box. Well, I deleted the module and reinstalled it. This is the error I received upon trying to access the Captcha settings in User Management of my Admin panel:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'captcha_admin_settings' was given in /home/xxx/public_html/includes/form.inc on line 366.
After finding the file and opening it in a CSS editing program, the is how the line looks:
$form = call_user_func_array(isset($callback) ? $callback : $form_id, $args);
Could anyone offer advice to how I can fix this, so that I can once use the Captcha module again? I would greatly appreciated it, thanks!
Comments
Comment #1
soxofaan commenteddid you disable the module before deleting the module's files?
did you put back all the files? The error message you are getting is because Drupal can't find the file
captcha.admin.incComment #2
Angelita commentedThanks for the response. No, I didn't disable the module before deleting it, it was enabled and I couldn't disable it under Admin, Building, then Modules. The CAPTCHA selection area was "grayed out" and not clickable, the only clickable feature was Image CAPTCHA. I didn't back up any of the files as well. So with all that said and done, what could I possibly do now to utilize this feature without issues? :(
Comment #3
soxofaan commentedvery wrong thing to do, and the source of your problem.
The check box of CAPTCHA is disabled because Image CAPTCHA depends on CAPTCHA. You first have to disable Image CAPTCHA and then you can disable CAPTCHA.
download the module's tar ball again, extract it to your site's module folder (preferable the same position as before, but it doesn't have to be), and visit the module listing page (the admin page with all those check boxes) to refresh the modules' metadata. This should be enough to get things back up.
Comment #4
Angelita commentedThanks again for your speedy reply.
Yeah, I figured that should have done that prior to deleting the whole module. I apologize but I'm not an intermediate when it comes to web mastering but could you please elaborate when you say "download the module's tar ball again, extract it to your site's module folder." Also, when I extract this particular file(s), would it go into the existing folder of CAPTCHA in my site: Ex. Public_html>Modules>Captcha ?
I assume download the entire zip and extract it all to the site's particular folder, but I just want to make sure I'm understanding it correctly before I make another mistake being uncertain. Thanks, I really appreciate your help in this:)
Comment #5
soxofaan commentedno problem
DRUPALROOT/sites/all/modules(with DRUPALROOT=Public_html in your example), or if you use the multisite feature of drupal:DRUPALROOT/sites/yoursite.com/modules. It is strongly advised to *not* put contributed modules underDRUPALROOT/modules, that folder is only for drupal core modules.Comment #6
Angelita commentedThanks so much soxofaan!
With the advisement, sad thing is that all my modules for the site are located in the "Public_html/modules/....." folder. I wasn't the original creator of the site that I now own and this is how it was created. I've actually looked in the "Public_html/sites/all/" and there is only a README.txt:-/ I just hope not to come across any future issues with the way it has been set up. I'll surely download the latest version of CAPTCHA and tackle this again, I'll come back here hopefully with good news. Thanks again for your time in assisting me, its truly appreciated.
Comment #7
soxofaan commentedUpdating your site to a new drupal version (e.g. from 6.17 to 6.18) will be more painful with this setup than it should be. The reason for this is that for an update, you have to overwrite the old files with the new files, and if you mix core and contrib modules in the same folder, it's harder to not make mistakes.
If I understood correctly, you are working directly on live site? If so, fixing this (moving the contrib modules to
DRUPALROOT/sites/all) is a rather risky business unfortunately (as you experienced with the CAPTCHA module already)Comment #8
Angelita commentedOh geez, so I most likely will be running into some errors. I've done a Drupal update in the past amazingly without issues, but hopefully this upcoming security update would be painless. And if I can remember, when I did the update, I had to disable all modules before doing the update, and I did have to reinstall a few of the contributed modules again if I'm not mistaken. I'm behind in updating Drupal due to procrastination, and I know that's terrible seeing as there are updates, I'm just frightened of error.
Yes sir, the site has been up and running about 2.5 years now (http://bit.ly/bVfzey). I understand the riskiness of it and with my limited knowledge in Drupal, I'm afraid to even move anything, fear of the site crashing or something is why. I usually try to find some assistance with Drupal when I don't understand. I like to ask you, would you suggest any online forum or groups that would be helpful in Drupal, I'm sorry to have to ask, you've been beneficial with my CAPTCHA issues, if not, I surely understand:) I'll try the CAPTCHA extraction in a few hours when I'm able to access my sites files. Again, I truly appreciate your time in everything.
Comment #9
soxofaan commentedThe next time you update drupal or a crontrib module and you have to disable the contrib modules, you could take the opportunity to move them. Moving a disabled module should be pretty harmless.
I don't have the resources to provide support outside CAPTCHA and the other modules I maintain, so for the kind of assistance you want, I would try the drupal forums or IRC (see http://drupal.org/support for more pointers). Or maybe you have some local drupal user group in your neighborhood?
Good luck.
Comment #11
Angelita commentedThanks, I will do this soon. Sorry about the delay, I appreciate all the help you've given me. I'll have to update soon as I'm still receiving the error. The image captcha only displays 1-2 letters with this displayed error I'm receiving now:
user warning: Unknown column 'token' in 'field list' query: UPDATE captcha_sessions SET token='60c95bf66c514aa0b70ba281b606e8b1' WHERE csid=7343 in /home/xxx/public_html/modules/captcha/captcha.module on line 213.
Line 213 displays: db_query("UPDATE {captcha_sessions} SET token='%s' WHERE csid=%d", $captcha_token, $captcha_sid);
ReCaptcha works fine though the error stays on the page when one visits.
For now I'll just have to disable the Captcha module, it was vital to the site, but I'd need to do the updates and move the modules in the correct area maybe to bypass the issues I've been having. Thanks again for your assistance.
Comment #12
Angelita commentedComment #13
soxofaan commentedSeems your database schema is outdated.
Did you run the update.php script already after upgrading CAPTCHA to 6.x-2.3-rc or later?
Comment #14
Angelita commentedYou're correct, the database is outdated from the alert I see when going into the Administration section and I have to run the update.php script. I'm not certain as to what to do but I'll be seeking help for these updates requirements soon and will come back with hopefully a progress report. I really miss that CAPTCHA feature, without it, the spam has been horrible. Well, I guess I should put this in 'postponed' status until then. Thanks for all your assistance, I really appreciate it.
Comment #15
zeropx commentedWhile later this still helped me. Just saying a belated thanks. :D Get caught up in deploying and forgot I had updated the module locally.
Comment #16
soxofaan commentedOk, I guess this issue can be closed then