Customer registration not working – Magento 1.9.2.2

4.77/5 (106)

The problem

Click here if you want to go directly to the solution.

After upgrading to Magento 1.9.2.2, or installing security patch SUPEE-6788, it might happen that your customer registration form stops working. After filling in the registration form and submitting it, the page only refreshes without creating a customer account.

The cause

Magento 1.9.2.2 adds a hidden form field with the form_key to the registration form:

<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />

If you don’t add this line, the form will not be processed. A lot of themes update the register.phtml files, so upgrading Magento will not override these files and add the form_key field.

The solution

Add the following code to the register.phtml file used in your shop (between the <form></form> tags)

<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />

The default register.phtml files are located in:

app/design/frontend/base/default/template/customer/form/register.phtml
app/design/frontend/base/default/template/persistent/customer/form/register.phtml

If you use the rwd template, there is only one file to update:

app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml

It still doesn’t work

Lots of 3rd party extensions also override the register.phtml files. To locate which template is used in your shop, you can simply enable Template Path Hints in the Magento configuration. Once you have located the culprit, update it as described above. Make sure you clear your cache after you update the template files.

Reset password form doesn’t work

Yes, the reset password form is also updated. The default file is located at

app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml

The rwd file is located at

app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml

Did you find this post useful?

48 thoughts on “Customer registration not working – Magento 1.9.2.2”

  1. Thanks for this – resolved my issue whereby people were not able to create a new account after upgrading to 1.9.2.2.

    Cheers,

  2. Thanks for the info, I solved the problem in view of laptop, but does not work on smartphone or tablet

    Any ideas? (I modified all files “register.phtml” on the server)

    thus leaving the code:
    <form action="getPostActionUrl() ?>” method=”post” id=”form-validate”>
    <input type="hidden" name="form_key" value="getFormKey() ?>” />

  3. Many Thanks !
    You saved my time. My problem was due to inchoo socialconnect module overriding the template file. I added this:
    <input type="hidden" name="form_key" value="getFormKey() ?>” />

    inside form section of this file: app/design/frontend/mytheme/default/template/inchoo/socialconnect/customer/form/register.phtml

    And all is fine now.

    Thanks again !

  4. Hi, thank You for posting this, although I need some more help.
    Where exactly do I have to paste the code?
    Because in both files I pasted in the lower part of the file just above and it didn’t have any affect.
    And there are no register files in my template folders.
    I hope someone can tell me where to exactly paste the code, and in what line.
    Thanks in advance 😉

    1. Hi Fuzzy,

      You should enable Template Path Hints through System => Developer => Debug. Then, in the frontend, you will see which template is used to display the registration form.

  5. Really Helpful Information. i had same issue. Thanks for your help.

    Keep Posting Such a valuable articles. i hope you will keep posting magento2 articles.

  6. I had the same issue with blank form result after submitting.
    I’m running Magento 1.9.1 and this fix worked like charm!!

    Thanks you saved the day!

  7. app/design/frontend/base/default/template/opc/customer/form/register.phtml – this was mine issue because of IWD Onepage Checkout

    1. Hello, i have the same issue with the IWD one page, and work for register, but don’t work in forgotpassword, do you have the same issue? do you know how solve it?
      I really apreciate your help

  8. thank you a lot.
    I think if you need find your template all register.phtml in you template.so change ,you can success

  9. Not working for me too, still I am not able to see customer details from back end and not able to create a new account from the front end. Plz look into this.
    Thanks in advance.
    Regards
    Tinku

  10. It solved in part.
    Create a new customer via Login toplink, works fine.
    But via “mywebsite.com/customer/account/create” link, dosen’t work.

  11. This worked for me. It didnt work at first but them i put template path hints on and went to the registration page and i saw that the register.phtml that was being used was in the persistant directory in my theme folder, not the one in base/default as this article explains.

  12. Thanks for this article. It’s ridiculous how many bugs there are in magento. Just noticed that my register form wasn’t working and was probably why I haven’t had many orders on my site recently. At least now, within minutes of finding your article, it’s all fixed. Kudos to you on the clarity of your article. Big help!

  13. hi, i am using magento 1.7.0.2 version and on checkout page you have registere form but it does not work.
    i tried to put <input type="hidden" name="form_key" value="getFormKey() ?>” />
    into app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml
    but it did not work,can please someone help me?

  14. Thank you for the code, it works great.
    Code can be put right before close to the end of the file, around line 182 .

  15. Many thanks for the code, now all works very fine. I pasted the code before in the final part of the page.

Leave a Reply

Your email address will not be published. Required fields are marked *