Magento 2 – Cannot Create New User Account

centosmagento2PHPphp-7

I recently updated my store to Magento 2.1.9 and am unable to create customer accounts. I enter all the information to create a new customer (on the frontend), but when you press the "Create Account" button you're redirected to the same page.

Though only the first one exists in my template, I have already tried adding <?php echo $this->getBlockHtml('formkey') ?> to:

  • app/design/frontend/[your_custom_theme]/template/customer/form/register.phtml
  • app/design/frontend/[your_custom_theme]/template/customer/form/resetforgottenpassword.phtml
  • app/design/frontend/[your_custom_theme]/template/persistent/customer/form/register.phtml
  • app/design/frontend/[your_custom_theme]/template/persistent/customer/form/login.phtml

I have changed the cookie domain and cleared the cache on many occasions. Besides that I couldn't find many others with the same issue as myself. I feel like it might have something to do with customer attributes because the account creation page has very few fields on it? There is also an issue items not being added to the cart, I don't know if these are related. Any help is appreciated!

Specs:

  • CentOS 7

  • php 7.0.6

  • Magento 2.1.9

  • Template: TemplateMonster (I feel like this might be relevant for this question)

Best Answer

I had a similar issue and it turned out I'd missed a form key in the Magento_CustomerCustomAttributes module override : Magento_CustomerCustomAttributes/templates/customer/form/register.phtml

I'd check over each of the registration template files and make sure you haven't missed anything as this is very symptomatic of the 2.1.9 upgrade with regards to form keys.

Related Topic