Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
Theo

[Solved, pending module patch] Please help: NoCaptcha Re-captcha module skips validation on Contact Form

Question

Hi

Tried implementing NoCaptcha Re-Captcha on the Contact form (using TB 1.1.0 with Panda with latest Captcha module)
But the Captcha validation is being skipped, so the form allows you to post without Captcha validation. 
Login attempts is set to 0.

I see this has been reported as a bug a while back, but not seeing any updates? Also, it appears to be mentioned in the thread below, but no apparent solution?
https://github.com/thirtybees/nocaptcharecaptcha/issues/5
https://forum.thirtybees.com/topic/2400-2400/no-captcha-recaptcha-installed-but-start-receiving-spam-mails-again/#comment-23808

Is there perhaps a temporary fix that I can implement in the code until a bug fix becomes available?

 

There is a javascript error that occurs after the form has been submitted (in case this is relevant):

recaptcha__en.js:515 Uncaught Error: reCAPTCHA placeholder element must be an element or id
    at Object.lS [as render] (recaptcha__en.js:515)
    at onloadCallback (contact-us:299)
    at WY (recaptcha__en.js:518)
    at recaptcha__en.js:511
    at Qo (recaptcha__en.js:504)
    at Cc (recaptcha__en.js:511)
    at recaptcha__en.js:519
    at recaptcha__en.js:539

 

Edited by Theo

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Have you tried slide captcha .. I just hate reCaptcha.. Don't know if it's worse or not but it seems to work

 

Share this post


Link to post
Share on other sites
  • 0
8 hours ago, AndyC said:

Have you tried slide captcha .. I just hate reCaptcha.. Don't know if it's worse or not but it seems to work

 

You may hate it, but it's kind of a standard. Everybody knows what it means and they have learnt to click on it subconsciously.

If you, however, put some slide thingy on your page, it's not so obvious. You make your visitors think, and that's basic UX issue 

Share this post


Link to post
Share on other sites
  • 0
14 hours ago, wakabayashi said:

Have you tried this one? 

 

Hi

Nope, this doesn't work :(  @datakick mentions here to do the following:

"you edit override file (\override\controllers\front\ContactController.php) and replace all occurrence of Module::isEnabled('NoCaptchaRecaptcha') with Module::isEnabled('nocaptcharecaptcha') "

For me, there's only one instance of the title case "NoCaptchaRecaptcha" in this file and replacing it with lowercase does not work.
Contact form still bypasses Captcha.

Can this module not be patched with the fix and pushed as an update? Like the other TB modules (Beez Blog etc)?
 

Share this post


Link to post
Share on other sites
  • 0

I still think the module should be patched and pushed as update, as people have been downloading 1.1.0 with this bug, activating Captcha and just assuming that it was working correctly...

However, I think that the reason why the "fix" is not working for me at the moment is because I already have an override for ContactController.
My override is a result of implementing Nemo's "add additional field to Contact form" post. (http://nemops.com/adding-new-fields-to-prestashop-contact-form/#.XjkioCOxWUl)
Will see what I can do to merge the two and will give update.

Edited by Theo

Share this post


Link to post
Share on other sites
  • 0

For those of us with an existing ContactController override:
Ok confirmed, the reason why it wasn't working on my side is because I already had an override for ContactController as stated above.
Used the new ContactController file as created by the "nocaptcharecaptcha module" as main.
Identified Nemo's code from previous override and pasted into new main override (the entire "if (Tools::isSubmit('submitMessage')) {}" code block)
Commented out "return parent::postProcess();" from the "nocaptcharecaptcha" module.
Now everything works as expected.

For those with no previous ContactController override:
The following works:
Go to "override\controllers\front\ContactController.php" and replace all occurrences of Module::isEnabled('NoCaptchaRecaptcha') with Module::isEnabled('nocaptcharecaptcha') 

As per DataKick's post here


Hopefully this gets patched and rolled out as update to "nocaptcahrecaptcha" module.
 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...