0

I'm using Magento 2.3.5, the customer registration doesn't work. It won't upload a new customer to the admin side. I am using custom attributes for my registration but that doesn't seem like the problem because if try to edit my profile the changes are saved on the admin. So I'm not sure what is the problem?

2 Answers 2

0

Of the custom customer attributes you have added, are any of them marked required and NOT visible on the customer registration page? If so, that could be the culprit. When the customer model gets saved, it will fail if there are attributes that are required that do not contain a value / fail the required validation.

I've had this happen with attributes I've created through extensions where they were initially created to be required but did not show up on the customer registration page.

2
  • Hi, the only attribute that is required but not visible is the store_id one. Is that causing the problem? I'm not able to edit this one since it doesn't appear to be a custom attribute.
    – Zei
    Jan 20 at 19:37
  • I don't think store_id would be an issue if you haven't made any changes to that attribute and given that it is a built in attribute. Have you checked the magento logs? var/system.log, var/exception.log might give a clue as to why the customer model doesn't get saved.
    – sdaugherty
    Jan 31 at 22:21
0
  1. First check for form key in registration.php

I have added the form key code in the file after the tag at line 21.

app/design/frontend///Magento_Customer/templates/form/register.phtml

Code

<?php echo $block->getBlockHtml('formkey')?>
  1. If the form key is already there, then it may be a browser issue (in my case it was working in all browsers except chrome). In that case if you are on localhost try to use 127.0.01 instead of localhost or your intranet IP in my case it was like(192.0.1.103/magento2)
  2. If you are already on live site I think there is a problem with the session cookie with the chrome browser.
2
  • Yes, form key is there but it doesn't seem to be working on any browser.
    – Zei
    Jan 20 at 19:43
  • You can try again by setting the default value for this field and then try again the steps you did. Jan 27 at 7:37

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.