Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Getting Recaptcha to work in UserForms Module

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 4607 Views
  • Media Contour
    Avatar
    Community Member
    33 Posts

    Re: Getting Recaptcha to work in UserForms Module Link to this post

    I followed the instruction to setup the reCaptcha and I still get the following error.

    Fatal error: Class 'RecaptchaProtector' not found in /var/www/stage/fit/spamprotection/code/EditableSpamProtectionField.php on line 31

  • Sunnybex
    Avatar
    Community Member
    39 Posts

    Re: Getting Recaptcha to work in UserForms Module Link to this post

    Hi there,

    I am getting the same error message as victuoso

    Any suggestions?
    Thanks in advance

    Bex

  • merrick_sd
    Avatar
    Community Member
    94 Posts

    Re: Getting Recaptcha to work in UserForms Module Link to this post

    I have installed
    chillu-recaptcha-ecb4394

    with silverstripe 2.4.5
    Im using

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" lang="en">
    <head>

    the page load etc and i see the recaptcha .etc but i see js error

    js details
    Uncaught TypeError: Cannot set property 'innerHTML' of null

    in the readme it says

    ## Known issues:

    ReCAPTCHA current does not work if the page doctype is XHTML. The API returns
    Javascript which uses "document.write", which is not supported in XHTML.
    A work-around is to always use the no-script version of the module (modify the
    relevant lines in RecaptchaField.php), or to switch your webpage's doctype to
    HTML 4. See: http://www.w3schools.com/tags/tag_DOCTYPE.asp

    Question:I want to stay with Xhtml strict
    It says modify the
    relevant lines in RecaptchaField.php, but which lines?

  • spijker1056
    Avatar
    Community Member
    6 Posts

    Re: Getting Recaptcha to work in UserForms Module Link to this post

    Hi and thanks for your suggestions to this point.

    I have an ss3.0.5 install of Silverstripe on my localhost at this time.
    I have installed the REcaptcha module and the spamprotector module.
    I have also put the public and private keys and the SpamProtectorManager::set_spam_protector('RecaptchaProtector'); for spam protector.
    I am also using the userforms module.

    I have now got to the point where everything runs fine and I can add the spam protector field to the form but it does not display on the form.

    I also followed the tip to log out of my admin but still no reccaptcha showing up.

    And yes I also did the obligatory flush=all .,.. ;-)

    Can you suggest what I might be doing wrong or may have omitted.

    Many Thanks

    Rob

    4607 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.