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) 
1 Answer 1
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.
- 
 Does<?php echo $this->getBlockHtml('formkey')?>need to be in the core files? By core files I mean /vendor/magentoJoshua Day– Joshua Day2017年10月11日 19:33:23 +00:00Commented Oct 11, 2017 at 19:33
- 
 Well yes, but the core files should have all been updated when you upgraded.Frank– Frank2017年10月12日 08:03:51 +00:00Commented Oct 12, 2017 at 8:03
- 
 I don't think they were, I searched the file and wasn't able to find anything. There have been alot of weird issues with this magento installation...Joshua Day– Joshua Day2017年10月13日 16:34:12 +00:00Commented Oct 13, 2017 at 16:34
- 
 oh, I went back and checked and I put the formkey in the wrong place. I feel so stupid. But thank you for pointing me in the right direction!Joshua Day– Joshua Day2017年10月13日 17:03:55 +00:00Commented Oct 13, 2017 at 17:03