+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20

Thread: ReCAPTCHA not catching bad entries.

  1. #11
    Join Date
    Aug 2011
    Posts
    16

    Default Re: ReCAPTCHA not catching bad entries.

    OK entered site key and now error page says:

    An error occurred while processing the form .
    reCaptcha verification failed (incorrect-captcha-sol)

  2. #12
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: ReCAPTCHA not catching bad entries.

    Hi,

    You have this in your HTML:
    HTML Code:
    <input type="hidden" name="recaptcha_response_field" value="manual_challenge">
    That should not be there and is causing it to always fail.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #13
    Join Date
    Aug 2011
    Posts
    16

    Default Re: ReCAPTCHA not catching bad entries.

    Thanks - that solved the problem.

    I am just about there with my custom template, but I am using an incorrect entry for $TEMPLATEDIR:

    $TEMPLATEDIR = "/httpdocs/fmtemplates";

    I tried it with and without the httpdocs, but I am not sure what the path needs to be. I had understood that the domain name (eyesonafrica.net) was excluded and that this was a directory on my server, but I am confused.

    Here is the error I get when I put in an incorrect Captcha now:

    Cannot open template '/httpdocs/fmtemplates/fm-error.htm': fopen(/httpdocs/fmtemplates/fm-error.htm) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory

  4. #14
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: ReCAPTCHA not catching bad entries.

    Hi,

    That's good news about your progress!

    Figuring out the correct directory on a server can be a little challenging.

    Your hosting provider should be able to tell you it.

    You can also use FormMail's "testalert" test. The email you receive will give you a good idea of the correct directory path.

    Another alternative is to use a relative path instead of an absolute path. In this case, you just name the directory relative to the location of formmail.php.

    If "fmtemplates" is in the same directory as formmail.php, then you could have:
    PHP Code:
    $TEMPLATEDIR "fmtemplates"
    Note: no slashes at all.

    If it's in the directory above FormMail, it would be:
    PHP Code:
    $TEMPLATEDIR "../fmtemplates"
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #15
    Join Date
    Aug 2011
    Posts
    16

    Default Re: ReCAPTCHA not catching bad entries.

    Great stuff!

    The relative reference for the template dir works!

    Looks like I am about ready to go live.

    Last thing (I think)...

    Is there a way to replace generated error text with something more user-friendly?

    The only error I would expect now is a bad entry into the ReCaptcha. The generated text from this error is:
    reCaptcha verification failed (incorrect-captcha-sol)

    It would be preferable if I could somehow replace this text in my error template to something a user would be more likely to understand like:
    "Your anti-spam entry was incorrect"

    Any way to do this?

  6. #16
    Join Date
    Aug 2011
    Posts
    16

    Default Re: ReCAPTCHA not catching bad entries.

    What I mean is that although I don't expect other errors, I don't want to assume this and just type in my own message in case a different error does arise.

    My form uses a script to check for required entries, so the most common error should be the ReCaptcha, but I also want to be able to test in future for server errors, etc.

    So if there is a way to convert the generated text for a specific error type/code, then I would like to make it more understandable to my users.

    THX!

  7. #17
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: ReCAPTCHA not catching bad entries.

    Hi,

    Quote Originally Posted by weisj View Post
    Is there a way to replace generated error text with something more user-friendly?

    The only error I would expect now is a bad entry into the ReCaptcha. The generated text from this error is:
    reCaptcha verification failed (incorrect-captcha-sol)

    It would be preferable if I could somehow replace this text in my error template to something a user would be more likely to understand like:
    "Your anti-spam entry was incorrect"

    Any way to do this?
    It would be nice if the reCaptcha server produce a better error message, but the "incorrect-captcha-sol" is all we get.

    It's now been documented so we can rely on what it means (previously wasn't documented), so we can improve FormMail to provide a more direct message.

    We had to supply "reCaptcha verification failed" because we needed to be generic with the error summary (not having proper documentation from reCaptcha).

    However, that's not going to happen until at least the next release of FormMail.

    In the interim, you can create a file called "language.inc.php" in the same directory as formmail.php with the following contents:
    PHP Code:
    <?php
    $aMessages
    [MSG_RECAPTCHA_MATCH] = 'Your anti-spam entry was incorrect';
    ?>
    Of course, if the reCaptcha fails for another reason (such as server problems), that message will be misleading to your users, who may get frustrated.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  8. #18
    Join Date
    Aug 2011
    Posts
    16

    Default Re: ReCAPTCHA not catching bad entries.

    OK - well I think I gotta say that the extra $$ I spent for this support was more than worth it to me - you saved me hours and my time = $$, so thanks.

    Form seems to work as it should now and my custom templates too.

    ---

    I have one final question:

    What is the most efficient way to update formmail when you release a new version?

    Should I make notes of all the entries where I have input my specifics into the formmail.php?

    Just wondering which is best method or if there is an easier way than making precise notes in my own text file to be sure I update each setting.

    Thanks - awesome product.

    James

  9. #19
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: ReCAPTCHA not catching bad entries.

    Hi,

    Quote Originally Posted by weisj View Post
    OK - well I think I gotta say that the extra $$ I spent for this support was more than worth it to me - you saved me hours and my time = $$, so thanks.
    Thanks for the feedback - that's great to hear.
    I have one final question:

    What is the most efficient way to update formmail when you release a new version?

    Should I make notes of all the entries where I have input my specifics into the formmail.php?

    Just wondering which is best method or if there is an easier way than making precise notes in my own text file to be sure I update each setting.
    Provided you haven't made any changes to FormMail outside the Configuration Section (which is clearly marked with Start-End comments), you can use our free Upgrade Wizard.

    It copies all your current settings across during the upgrade and provides you with a download that includes the new version and your old version.

    If you do change FormMail's logic (i.e. outside the Configuration Section), then you'll need to re-implement any changes you made.

    And we can't ever guarantee that the code will look the same. In fact, we can guarantee that newer versions of FormMail will have re-factored code. We're gradually moving to a more Object-Oriented code base which allows a lot more flexibility and a stronger featureset.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  10. #20
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: ReCAPTCHA not catching bad entries.

    Hi,

    Quote Originally Posted by russellr View Post
    Hi,

    You have this in your HTML:
    HTML Code:
    <input type="hidden" name="recaptcha_response_field" value="manual_challenge">
    That should not be there and is causing it to always fail.
    I've just been reviewing the reCaptcha instructions and the code supplied by Google.

    That hidden field *should* be present, but it *must* be in the <noscript> section of the reCaptcha code.

    It's there for when a user has JavaScript switched off in their browser.

    I can confirm that our HOW TO guide shows the correct code.

    If you place that hidden field anywhere else, it is very likely to stop reCaptcha from working.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. CSV entries truncated
    By djonat in forum Community Support
    Replies: 1
    Last Post: 09-Jun-2009, 08:39 AM
  2. CAPTCHA bad submissions failing to load bad template
    By odieresis in forum Community Support
    Replies: 13
    Last Post: 03-Jun-2009, 08:08 AM
  3. prevent csv entries from same IP?
    By masa in forum Community Support
    Replies: 12
    Last Post: 20-Jan-2009, 08:06 AM
  4. Required entries
    By veteran in forum Community Support
    Replies: 5
    Last Post: 08-Aug-2007, 10:00 AM
  5. email entries to guest and owner
    By mariokrupik in forum Community Support
    Replies: 0
    Last Post: 28-Jun-2007, 04:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts