cancel
Showing results for 
Search instead for 
Did you mean: 

An error appears when submitting the contact form

An error appears when submitting the contact form

Hi guys,

I'm having problems when I click submit on the Contact Form.
That is, an error like this appears:

 

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Internal error: Make sure you are using reCaptcha V3 api keys

Exception #0 (Magento\Framework\Exception\LocalizedException): Internal error: Make sure you are using reCaptcha V3 api keys
<pre>#1 MSP\ReCaptcha\Observer\ReCaptchaObserver->execute(&Magento\Framework\Event\Observer#000000005206cfdf0000000016b4d80d#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:88]
#2 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(&MSP\ReCaptcha\Observer\ReCaptchaObserver#000000005206cfc10000000016b4d80d#, &Magento\Framework\Event\Observer#000000005206cfdf0000000016b4d80d#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:74]
#3 Magento\Framework\Event\Invoker\InvokerDefault->dispatch(array('instance' => 'MSP\ReCaptcha\Ob...', 'name' => 'msp_captcha'), &Magento\Framework\Event\Observer#000000005206cfdf0000000016b4d80d#) called at [vendor/magento/framework/Event/Manager.php:66]
#4 Magento\Framework\Event\Manager->dispatch('controller_actio...', array('controller_actio...' => &Magento\Contact\Controller\Index\Post\Interceptor#000000005206c97d0000000016b4d80d#, 'request' => &Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#)) called at [generated/code/Magento/Framework/Event/Manager/Proxy.php:95]
#5 Magento\Framework\Event\Manager\Proxy->dispatch('controller_actio...', array('controller_actio...' => &Magento\Contact\Controller\Index\Post\Interceptor#000000005206c97d0000000016b4d80d#, 'request' => &Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#)) called at [vendor/magento/framework/App/Action/Action.php:100]
#6 Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/module-contact/Controller/Index.php:67]
#7 Magento\Contact\Controller\Index->dispatch(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#8 Magento\Contact\Controller\Index\Post\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#9 Magento\Contact\Controller\Index\Post\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#10 Magento\Contact\Controller\Index\Post\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#), array(array('designLoader', 'customerNotifica...', 'catalog_app_acti...', 'tax-app-action-d...', 'weee-app-action-...', 'storeCheck', 'contextPlugin', 'customer-app-act...'))) called at [generated/code/Magento/Contact/Controller/Index/Post/Interceptor.php:39]
#11 Magento\Contact\Controller\Index\Post\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/App/FrontController.php:162]
#12 Magento\Framework\App\FrontController->processRequest(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#, &Magento\Contact\Controller\Index\Post\Interceptor#000000005206c97d0000000016b4d80d#) called at [vendor/magento/framework/App/FrontController.php:98]
#13 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#14 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#15 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:99]
#16 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#000000005206caac0000000016b4d80d#, &Closure#000000005206ca0d0000000016b4d80d#, &Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#17 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [app/code/Amasty/InvisibleCaptcha/Plugin/Framework/App/FrontControllerInterface/ValidateCaptcha.php:124]
#18 Amasty\InvisibleCaptcha\Plugin\Framework\App\FrontControllerInterface\ValidateCaptcha->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#000000005206caac0000000016b4d80d#, &Closure#000000005206ca0d0000000016b4d80d#, &Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#19 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69]
#20 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#000000005206caac0000000016b4d80d#, &Closure#000000005206ca0d0000000016b4d80d#, &Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#21 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#22 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#), NULL) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#23 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000005206cb4c0000000016b4d80d#) called at [vendor/magento/framework/App/Http.php:116]
#24 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#25 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#26 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000005206cb610000000016b4d80d#) called at [index.php:39]
</pre>

 

Please help immediately, guys.

4 REPLIES 4

Re: An error appears when submitting the contact form

It appears you have an extension called Invisible Captcha by Amasty that is causing the issue.

 

Not sure which version of Magento you're running but for quite a long time, Goolge's invisible captcha v3 is part of the Magento core, so you might want to remove any unnecessary extensions such as this one and configure the default v3 recaptcha.

Founder at https://agency418.com

Re: An error appears when submitting the contact form

Hi @toniagency82ed ,

 

I'm using Magento ver. 2.3.5-p2

Re: An error appears when submitting the contact form

Then first upgrade your Magento, your version is from 2020, you are missing lots of security patches and bug fixes as well as performance improvements right now. 

 

Since you're on such an old version, this upgrade will require the upgrade of php from 7.4 to 8.1 as well so this will be a major upgrade but it has to be done.

Founder at https://agency418.com

Re: An error appears when submitting the contact form

Hi @bintang partomo.

 

The error message you're encountering indicates an issue with the reCaptcha configuration for the contact form in your Magento store.

 

To resolve this issue, follow these steps:

 

  • Ensure reCaptcha V3 API Keys are Configured: Make sure you have configured reCaptcha V3 API keys in your Magento store. You need to obtain the Site Key and Secret Key from the Google reCaptcha admin console and configure them in the Magento Admin Panel.

 

  • Check reCaptcha Configuration in Magento Admin Panel: Go to the Magento Admin Panel and navigate to Stores > Configuration > Security > Google reCaptcha. Ensure that the correct reCaptcha version (V3) is selected, and the Site Key and Secret Key fields are filled with the corresponding values obtained from the Google reCaptcha admin console.

 

  • Verify Integration with Google reCaptcha Admin Console: Double-check your integration settings in the Google reCaptcha admin console. Ensure that the domains for your Magento store are correctly configured, and the reCaptcha V3 option is enabled.

 

  • Clear Cache: After making any changes to the configuration, clear the Magento cache by running the following command:
    php bin/magento cache:flush

 

  • Test Contact Form: Once the reCaptcha configuration is updated, test the contact form again to verify if the issue has been resolved.

 

If the issue persists after following these steps, you may need to further investigate the reCaptcha configuration and ensure that the keys are correctly configured and the integration is properly set up both in Magento and in the Google reCaptcha admin console. Additionally, reviewing any customizations or extensions related to reCaptcha or the contact form may also be necessary.

 

If the issue will be resolved, Click Kudos & Accept as a Solution.