Contact Form – Google Recaptcha v3 Problem

Home Forums Porto – Responsive HTML5 Template Contact Form – Google Recaptcha v3 Problem

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #10045090
    bimtech
    Participant

    Hello,
    I ran the contact form without captcha and successfully sent an e-mail with my smtp information.

    Then I entered the secretkey and sitekey information for recapcha v3. And I posted the form to work with recaptcha v3. It appears that the capcha is verified at the bottom right of the page. But when I try to send the form, it gives the error “Array ( ) {“response”:”error”,”errorMessage”:”reCaptcha Error: Invalid token. Please contact the website administrator.”}”.

    I await your response, I wish you a good day.



    Template Version: Theme Version: 10.2.0
    #10045091
    Support
    Keymaster

    Hello, thanks for your purchase.

    1) Get the original PHP file: php/contact-form-recaptcha-v3.php:

    2) Change only lines:

    – Line 27: https://www.okler.net/previews/porto/docs/assets/img/recaptcha-6.jpg

    – Line 56: https://www.okler.net/previews/porto/docs/assets/img/recaptcha-7.jpg


    #10045092
    Support
    Keymaster
    #10045097
    bimtech
    Participant

    Hello, I did as you said, downloaded the original PHP file: php/contact-form-recaptcha-v3.php and filled in the necessary fields. But I still get the error “reCaptcha Error: Invalid token. Please contact the website administrator.”


    #10045098
    bimtech
    Participant

    Hello, we have launched our website. http://bimtech.com.tr The issue is urgent. We are waiting for your support.


    #10045099
    Support
    Keymaster

    Change the class of the form:

    <form id="contactForm" class="contact-form" action="php/contact-form-recaptcha-v3.php" method="POST" novalidate="novalidate">

    TO:

    <form class="contact-form-recaptcha-v3" action="php/contact-form-recaptcha-v3.php" method="POST" novalidate="novalidate">

    And try again.


    #10045101
    bimtech
    Participant

    Nothing has changed. Current error: “reCaptcha Error: Verification failed (no success). Please contact the website administrator.”


    #10045103
    Support
    Keymaster

    Can you confirm that you entered the $secret variable in the PHP file?

    $secret = 'YOUR_RECAPTCHA_SECRET_KEY';

    Looks like the validation secret is not correct.

    Make sure you generated it for Recaptcha v3, as this: https://www.okler.net/previews/porto/docs/#googlerecaptchav3

    Try to remove that key and create a new one, updating the HTML and PHP file.


    #10045105
    bimtech
    Participant

    I created a new key as you said and put it in the relevant places in both the form and the PHP file. The problem still persists. error: reCaptcha Error: Verifcation failed (no success). Please contact the website administrator.


    #10045106
    Support
    Keymaster
    This reply has been marked as private.
    #10045107
    bimtech
    Participant
    This reply has been marked as private.
    #10045108
    Support
    Keymaster

    Hello, looks like your server is blocking the external verification (to Google Recaptcha), it’s limited and the settings can’t be changed.

    Ask your server administrator (host provider), to enable allow_url_fopen – Set that to “on”.

    Then check this page: http://bimtech.com.tr/php/phpversion.php

    It should “On”

    Not sure why your server is limited to that, it works for 99% of the servers with this command on PHP: ini_set(‘allow_url_fopen’, true);


    • This reply was modified 2 months, 1 week ago by Support.
Viewing 12 posts - 1 through 12 (of 12 total)

This topic is marked as "RESOLVED" and can not rceive new replies.