10

In my magento site I have enabled Captcha for Create Account form of custom theme which I built from scratch(not "rwd"), but when I try to register a customer with providing correct captcha code in the field, even then it shows "Incorrect Captcha" after refreshing & redirecting to same page.

No warnings/errors either in the client or server.

Can anyone guide me ?

  • 1
    I'm having the same issue. I noticed though if you click the refresh button on the CAPTCHA image and enter the new value correctly, it accepts it. Have you experienced the same behaviour? – Moose Jun 13 '15 at 8:51
  • Try free one magecomp.com/magento-new-recaptcha.html – Gaurav Jain May 15 '18 at 19:17
2

You can solved by Debug the captcha check process.

So ,please follow the below process.

Magento customer registration form's captcha has been check at class Mage_Captcha_Model_Observer on function checkUserCreate() using controller_action_predispatch_customer_account_createpost event.

There magento is check captcha value at using :

$captchaModel->isCorrect($this->_getCaptchaString(Mage::app()->getRequest(), $formId))

That means here magento send the value of field of captcha[user_create] and the field is match on Mage_Captcha_Model_Zend at function isCorrent()

This field match with session value.

Mage::getSingleton('customer/session')->getData($this->_getFormIdKey('word')

value

By using this you can track where the issue

  • iam also getting same error.how to check this @Amit Bera – Nadh May 26 '17 at 6:35
1

The problem can refer to incorrect input field name (for example, name="captcha_user_create" instead of name="captcha[user_create]"). Or JS captcha init new Captcha(...) is fired twice.

Is there file template/captcha/zend.phtml in your custom theme?

Do you use captcha on other pages (forgot-password, login)? Does it work correctly on another pages?

Do you use two captchas on single page?

Also please make sure that you don't call Mage_Captcha_Model_Zend::isCorrect method twice, as it wipes out captcha value from customer session. If you do, you will always get that "Incorrect CAPTCHA" message.

  • Now that you mention it, there are two captchas on the single page. We have a pop-up login icon and I see a CAPTCHA is being generated there as well when on the registration page. The only place CAPTCHA is enabled is on the customer registration page. – Moose Jun 15 '15 at 15:31
1

View your source and see if there is another CAPTCHA form on the page.

I had this same issue. The problem for me was that the AjaxPro extension had a hidden login form that was also using CAPTCHA. Since both forms had the same block name of "captcha", my block was being used twice, and the code was being refreshed for the second (hidden) form on page load, thus invalidating the one on my form. So I had to rename the block for my custom form, for example, from "captcha" to "captcha.custom". Then it worked great.

  • I can confirm that this was the root of my issue. I too had the AjaxPro extension and it added a login popover box in the header. When I hovered over, i saw the second CAPTCHA. I fixed it by going to app/design/frontend/base/default/template/tm/ajaxpro/customer/login.phtml and commenting this out: <?php echo $this->getChildHtml('form.additional.info'); ?>. – NotJay Jul 27 '18 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.