http://www.silverstripe.org/recaptcha-module/
I had SilverStripe 2.4.x + the Forum module + Recaptcha (+Spam Protection module) working on a fresh install of SilverStripe. However, repeating the same steps on the production server I seem to be getting the response:
"Your answer didn't match the captcha words, please try again"
after submitting the Forum user registration form, even when the Recaptcha is obviously correct.
I'm wondering if there's some domain/keys issue. I've tried using public/private global keys for both the domain of the URL (http://foo.bar.org) and the hostname of the actual web servers (let's say: server1.gronk.org).
The steps I have done are basically:
- installed Forum module
- installed Recaptcha into /html/recaptcha
- registered w/google.com/recaptcha and generated a public/private keypair for the domain I am using
- installed Spam Protection module into /html/spamprotector
- /dev/build on the site
- ?flush=1 on the site
- in /mysite/_config.php added 3 lines:
RecaptchaField::$public_api_key = '<public key copied from google.com/recaptcha>';
RecaptchaField::$private_api_key = '<private key copied from google.com/recaptcha>'';
SpamProtectorManager::set_spam_protector('RecaptchaProtector');
- in /forums/code, edited 2 files: ForumMemberProfile.php, ForumRole.php
ForumMemberProfile.php, added this line under line 165 the check "if(class_exists('SpamProtectionManager')":
$protector = SpamProtectorManager::update_form($form, 'MyCaptcha'); // to make the recaptcha work with your form
ForumRole.php, added a recaptca field under line 171 to the $personalDetailsField form code:
new RecaptchaField('MyCaptcha')
A Recpatcha image box appears but 100% of the time after the form is submitted the response is:
"Your answer didn't match the captcha words, please try again"
and the user is not registered but rather brought back to the form back to try again. Is there something obvious I am forgetting?
Suggestions?