Git Product home page Git Product logo

karliuka / m2.recaptcha Goto Github PK

View Code? Open in Web Editor NEW
31.0 6.0 13.0 147 KB

Magento2. Extension is integrate Google Recaptcha with your Magento2 store.

License: Open Software License 3.0

PHP 82.70% HTML 4.70% JavaScript 11.42% Less 1.17%
recaptcha magento2-recaptcha magento2 magento2-extension magento2-module magento2-extension-free magento-extension magento-2 magento-2-extension magento-2-module

m2.recaptcha's Introduction

Magento2 ReCaptcha

Total Downloads Latest Stable Version

Extension is integrate Google Recaptcha with your Magento2 store.

Compatibility

Magento CE(EE) 2.0.x, 2.1.x, 2.2.x, 2.3.x, 2.4.x

Install

Install via Composer (recommend)

  1. Go to Magento2 root folder

  2. Enter following commands to install module:

    For Magento CE(EE) 2.0.x, 2.1.x, 2.2.x, 2.3.x

    composer require faonni/module-re-captcha:2.0.*

    For Magento CE(EE) 2.4.x

    composer require faonni/module-re-captcha:2.4.*

    Wait while dependencies are updated.

Manual Installation

  1. Create a folder {Magento root}/app/code/Faonni/ReCaptcha

  2. Download the corresponding latest version

  3. Copy the unzip content to the folder ({Magento root}/app/code/Faonni/ReCaptcha)

Completion of installation

  1. Go to Magento2 root folder

  2. Enter following commands:

    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy  (optional)

Configuration Frontend

In the Magento Admin Panel go to Stores > Configuration > Customers > Customer Configuration > ReCAPTCHA.

Magento2 ReCaptcha

Configuration Backend

In the Magento Admin Panel go to Stores > Configuration > Advanced > Admin > ReCAPTCHA.

Magento2 ReCaptcha

Forgot Your Password page

Magento2 ReCaptcha

Admin Login page

Magento2 ReCaptcha

Related Modules

ReCaptcha from B2b - Extension is integrate Google Recaptcha with B2B Extension your Magento2 store.

Uninstall

This works only with modules defined as Composer packages.

Remove database data

  1. Go to Magento2 root folder

  2. Enter following commands to remove database data:

    php bin/magento module:uninstall -r Faonni_ReCaptcha

Remove Extension

  1. Go to Magento2 root folder

  2. Enter following commands to remove:

    composer remove faonni/module-re-captcha

Completion of uninstall

  1. Go to Magento2 root folder

  2. Enter following commands:

    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy  (optional)

m2.recaptcha's People

Contributors

dmcip avatar faonni avatar gamewalker avatar karliuka avatar tanolalano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

m2.recaptcha's Issues

Error on Customer Login Page

I have been experiencing the error shown in the screenshot for the past few days and can't seem to figure out a fix. It is only happening on the customer login page and the register page but it also seems to be fairly random. Meaning, some days it will show just fine and then some it will not show, like today. I have the latest release installed on Magento 2.2.3.

untitled

Incorrect Error Redirect Url

Hi,
I'm extending your module to also add recaptcha for a contact form on a product page.

inside Faonni\ReCaptcha\Observer\ValidateObserver::_redirect() you are getting redirect url from form url provided in the configs. In my case form url which is also a layout handler is catalog/product/view which is incorrect url when used for redirect.

Wouldn't it be easier to just use a referer in all cases?

    protected function _redirect(Action $controller)
    {
		$this->_addError();		
		$this->_redirect->redirect(
			$controller->getResponse(), 
                        $this->_redirect->getRefererUrl()
		);
    }  

bug erreur javascript

Hi,

My website running with the version 2.1.6 of Magento.

After installation and configuration of module, theRecaptcha don't work in frontend i get this problem such as describe in the screenshot :
image

Do you have any idea of how to resolve the problem?
Thanks
Best regards

Override Form Contact Us ReCaptcha not displayed

I do override vendor/magento/module-contact/view/frontend/templates/form.phtml with app/design/frontend/my/theme/Magento_Contact/templates/form.phtml. This is the same file with our address and a google map added at the bottom of the page. I'm not sure how the CAPTCHA works but I do not see any mention of CAPTCHA in vendor/magento/module-contact/view/frontend/templates/form.phtml.
When this override file I close with underscore name, recaptcha works well, but not working in override contact us form.

Plugin breaks when using the X-Content-Type-Options: nosniff header

Hello,

I've installed your plugin locally and it works great, but when testing on our staging site I get the following console error:

Did not load script at 'https://staging.domainname.co.uk/customer/account/create/%3Cstyle%3E%20' because non script MIME types are not allowed when 'X-Content-Type: nosniff' is given.

We are using the X-Content-Type-Options: nosniff header to prevent content-sniffing attacks so do not wish to remove this. Would it be possible to modify your plugin so that it will work when this header option is set?

Recaptcha doens't show on production mode!

Hi, i'm on magento 2.2.4, php7

When I switched to production mode, Recaptcha started to not show up anymore,
capture
I found this exception in the system logs:

[2018-12-17 18:43:24] main.CRITICAL: Exception message: Sorry, but the administrator denied subscription for guests. Please <a href="https://www.website.ca/en-ca/customer/account/create/">register</a>.
Trace: #0 /home/website/public_html/vendor/magento/module-newsletter/Controller/Subscriber/NewAction.php(124): Magento\Newsletter\Controller\Subscriber\NewAction->validateGuestSubscription()
#1 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Newsletter\Controller\Subscriber\NewAction->execute()
#2 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->___callParent('execute', Array)
#3 /home/website/public_html/app/code/Mageplaza/BetterPopup/Plugin/Controller/Subscriber/NewAction.php(85): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->Magento\Framework\Interception\{closure}()
#4 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Mageplaza\BetterPopup\Plugin\Controller\Subscriber\NewAction->aroundExecute(Object(Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor), Object(Closure))
#5 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->Magento\Framework\Interception\{closure}()
#6 /home/website/public_html/generated/code/Magento/Newsletter/Controller/Subscriber/NewAction/Interceptor.php(26): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->___callPlugins('execute', Array, NULL)
#7 /home/website/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->execute()
#8 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#9 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->___callParent('dispatch', Array)
#10 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#11 /home/website/public_html/generated/code/Magento/Newsletter/Controller/Subscriber/NewAction/Interceptor.php(39): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->___callPlugins('dispatch', Array, Array)
#12 /home/website/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Newsletter\Controller\Subscriber\NewAction\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#13 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#14 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#15 /home/website/public_html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#16 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /home/website/public_html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#19 /home/website/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#20 /home/website/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#21 /home/website/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /home/website/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#23 /home/website/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#24 /home/website/public_html/en-ca/index.php(28): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#25 {main} [] []

'Checkout using your account form' has no recaptcha

The template and the script are loaded, but it is not showing it because in the template
ReCaptcha/view/frontend/web/template/checkout/reCaptcha.html
there is

and the value is not set.

The issue is here
ReCaptcha/view/frontend/layout/recaptcha_authentication_popup.xml

instead of
checkout
need to be
checkoutConfig

checkout => checkoutConfig
otherwise, the config source is empty.

also, I have found that in
ReCaptcha/etc/di.xml

for me it works with

index_index => cart_index

Thanks for the module. It is cool)

Class does not exist

Exception #0 (ReflectionException): Class Faonni\ReCaptcha\Observer\Adminhtml\ValidateObserver does not exist

Same will occur for

the other adminhtml observers. They simply do not exist.

Display Error when installed

1.installed
2.open hompage
3.display:

Fatal error: Uncaught TypeError: Argument 1 passed to Faonni\ReCaptcha\Model\Form\AbstractFormConfig::__construct() must be of the type array, null given, called in

ENV:
Magento 2.1.X
Php 7.0.X

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.