nenes25/eicaptcha

No captcha validation in the personal data form (customer account)

Fera opened this issue · 9 comments

Fera commented

Check if your issue exists

  • I confirm that i've search that my issue does not already exists

Your prestashop version

1.7.8.x

Eicaptcha version

2.4.x

Do you use a specific theme ?

I'm using at_movic, but the same error occurs in the default template

Describe the bug

Captcha unnecessarily appears in the Customer's account in Personal Data - it is not validated there anyway

Screenshots

No response

Additional context

No response

Hello,

Could you please provide an url to check ?

Regards,

Fera commented

Hello,

Could you please provide an url to check ?

Regards,

https://demo2.ferart.pl

Hello,
Thanks for the url
Unfortunately this website is restricted, so i can't check.

Regards,

Fera commented

Hello, Thanks for the url Unfortunately this website is restricted, so i can't check.

Regards,

It's working now. Sorry, I had the shop down because it's under construction

Hello,

Thanks for opening your website.
The issue is related with your theme that should implement some custom hooks.
I've never tested the module with leo themes.

On the default register page, the captcha is displayed as expected.
https://demo2.ferart.pl/pl/logowanie?create_account=1

I well see the captcha in the customer information page, but i am not able to reproduce the issue on a default theme.

image

In order to fix this issue you can add the condition
if (Configuration::get('CAPTCHA_ENABLE_ACCOUNT') == 1 && $this->context->controller->php_self == 'authentication') {
here https://github.com/nenes25/eicaptcha/blob/17/eicaptcha.php#L271

And after that it will not be displayed anymore on your page.

Regards,

Fera commented

Hello,

Thanks for opening your website. The issue is related with your theme that should implement some custom hooks. I've never tested the module with leo themes.

On the default register page, the captcha is displayed as expected. https://demo2.ferart.pl/pl/logowanie?create_account=1

I well see the captcha in the customer information page, but i am not able to reproduce the issue on a default theme.

image

In order to fix this issue you can add the condition if (Configuration::get('CAPTCHA_ENABLE_ACCOUNT') == 1 && $this->context->controller->php_self == 'authentication') { here https://github.com/nenes25/eicaptcha/blob/17/eicaptcha.php#L271

And after that it will not be displayed anymore on your page.

Regards,

On the default template, there is exactly the same situation in the Customer's account in the information section. I checked it on a fresh installation without any other templates and modules installed.

Your solution also removes the Captcha in the first step of thecheckout, and it is validated there. Cannot register.

OK so we can consider the problem from the other side and add condition such as

if (Configuration::get('CAPTCHA_ENABLE_ACCOUNT') == 1 && $this->context->controller->php_self != 'identity'

But i've tried again on a fresh instance and i have not your behavior, the captcha is not displayed on this page with default configuration and theme.

Regards,

Fera commented

It's not about hiding it, it's about having valid validation if it already appears there. Hiding in css is the fastest if the captcha isn't validated anyway.

stale commented

This issue has been automatically marked as stale because it has not had author feedback. It will be closed if no further activity occurs.