The problem was that the following:
<?php echo $this->getBlockHtml('formkey') ?>
Had to be added to:
template/customer/form/register.phtml
I am using the following inside a PTHML file:
if(!Mage::getSingleton('customer/session')->isLoggedIn()){
echo "<h1>YOU ARE NOT LOGGED IN</h1>";
echo $this->getLayout()->createBlock('customer/form_register')->setTemplate('customer/form/register.phtml')->toHtml();
echo "<br><br>";
echo $this->getLayout()->createBlock('customer/form_login')->setTemplate('customer/form/mini.login.phtml')->toHtml();
}
This creates the forms, as expected, however when I fill out the registration form and click the submit button I am directed to:
domain.com/customer/account/create/
When I fill out the login form I am redirected to:
domain.com/customer/account/login/referer/aHR0cDovL2Rldi53d3cucHJvdGVjdHlvdXJib3VuZGFyaWVzLmNhL2N1c3RvbWVyL2FjY291bnQvaW5kZXgv/
The user is not successfully logged in at this point.
I don't see any errors in the log files. Am I missing something? I wonder could it be related to the formkey stuff that was added?
My ultimate goal is:
- User comes to Page X while not logged in.
- User registers and/or logs in. (this is where I am stuck)
- User is returned to the Page X. (I have an observer that should work once above is solved)