Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4909

    Hey guys,

    I need some help or tipps to implement the ReCAPTCHA PlugIn correctly in

    the Habitat-Theme. After installing the plugin I got the following Error-Messages:

    1. Home/and other Pages

    Message: ‘document.getElementById(…)’ is null or not an object

    Line: 785

    Char: 17

    Code: 0

    URI: http://blog.gtp-architekten.de/

    CODELINES:

    <script type=”text/javascript”>

    var sub = document.getElementById(‘submit’);

    document.getElementById(‘recaptcha-submit-btn-area’).appendChild (sub);

    document.getElementById(‘submit’).tabIndex = 6;

    if ( typeof _recaptcha_wordpress_savedcomment != ‘undefined’) {

    document.getElementById(‘comment’).value = _recaptcha_wordpress_savedcomment;

    }

    document.getElementById(‘recaptcha_table’).style.direction = ‘ltr';

    </script>

    But if I click on the post or (read more) it works fine with the comments-form no errors are displayed!

    2. Contact-Page

    I put in the “template_contact.php” above submit this codeline: <?php do_action(‘comment_form’, $post->ID); ?>

    but also got the following errors:

    Message: Invalid argument.

    Line: 626

    Char: 17

    Code: 0

    URI: http://blog.gtp-architekten.de/kontakt/

    CODELINES:

    <script type=”text/javascript”>

    var sub = document.getElementById(‘submit’);

    document.getElementById(‘recaptcha-submit-btn-area’).appendChild (sub);

    document.getElementById(‘submit’).tabIndex = 6;

    if ( typeof _recaptcha_wordpress_savedcomment != ‘undefined’) {

    document.getElementById(‘comment’).value = _recaptcha_wordpress_savedcomment;

    }

    document.getElementById(‘recaptcha_table’).style.direction = ‘ltr';

    </script>

    For now I deactivated the PlugIn because the site is online.

    Thanks for your support in advanced!

    Kind Regards

    Frank

    #48078

    Hey,

    please use Contact form 7 and simple captcha plugin – it’s much easier to integrate them in Habitat.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Need help to implement ReCAPTCHA into Habitat’ is closed to new replies.