• Resolved webdev

    (@swapnilwebdev)


    Hello,
    I have enabled recaptacha from Reviews’setting, but it shows multiple as show here https://prntscr.com/kgzyt5

    also if i disable captcha from setting then there is no captcha but don’t allow to submit from, and alerts “Please confirm that you are not a robot” message,
    its due to your script in frontend.js where you hard coded it without checking captcha is active or not.
    please solve this issue and let me know.

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author cusrev

    (@ivole)

    Thanks for trying our plugin!

    I checked the page and noticed that you have several plugins for reviews activated at the same time. Can you please try to temporary deactivate other plugins and see if the problems with multiple captchas will be resolved?

    Captcha is added using the standard hook “comment_form_after_fields”. For some reason, on your website this hook is triggered several times.

    After deactivating captcha, can you please try clearing your browser cache? Captcha HTML and JS code can remain if the page is cached.

    Thread Starter webdev

    (@swapnilwebdev)

    Hi,
    After deactivating captcha, can you please try clearing your browser cache? Captcha HTML and JS code can remain if the page is cached.
    I have already check with deactivating and clearing cache from browser, but still it don’t allow to submit, same alert message “Please confirm that you are not a robot” ,
    Please check your plugin’s frontend.js file, which have code to check captcha, that creates the issue, you have to check if captcha is enabled then only validate in js, but that is not implemented.
    https://prntscr.com/khatsp

    //prevent review submission if captcha is not solved
      jQuery("#commentform").submit(function(event) {
        var recaptcha = jQuery("#g-recaptcha-response").val();
        if (recaptcha === "") {
          event.preventDefault();
          alert("Please confirm that you are not a robot");
        }
      });

    Also in your code you have used fixed id or google recaptcha, but if other captcha loads before your captcha then your id will be changed so it will not work.
    I have pass through all those error in this page.

    Please check those cases.

    Thanks.

    Plugin Author cusrev

    (@ivole)

    Thanks for providing additional information!

    The code in frontend.js that you mentioned will be executed only when recaptcha is activated. If it is not activated, then variable recaptcha = undefined, and the condition

    if (recaptcha === "")

    will not be true (“” is not equal to undefined), and the alert will never be shown.

    If this code is executed on your website, it means that there is some other plugin that adds recaptcha to the page.

    I checked HTML code of your webpage and found that it includes this:

    <script src="https://www.google.com/recaptcha/api.js" defer></script>

    Can you please tell me which plugin includes this script to the page?

    Thread Starter webdev

    (@swapnilwebdev)

    Hi ivole,
    you are using static ids for assuming only one captcha in page and that’s your, but i am also using other captcha in same page, which have same id #g-recaptcha-response, so it triggers your condition. which creates issue.

    <script src=”https://www.google.com/recaptcha/api.js&#8221; defer></script>
    this script is added by me to set manually invisible captcha for other forms.

    Plugin Author cusrev

    (@ivole)

    Yes, the assumption is that only one reCAPTCHA is used on a product page. Please install version 3.35.3 of the plugin – it should resolve your problem.

    Please let me know in case of any issues or bugs.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘recaptacha issue and conflicts’ is closed to new replies.