A white page is (usually) a PHP startup error. You need to just check all your corresponding logs, Magento logs, PHP logs etc.
If you're using mod_php
then Apache will log the errors, if not, then you'll need to define the cgi
wrapper or PHP itself to log errors; as Apache won't be aware of them.
Follow this guide - there is a section specifically about enabling PHP error display and logging.
This one is a bit tricky without rewriting the controller action but this should work. I called my example extension Emzee_ForgotPasswordRedirect
.
What it does: after the normal action for creating the forgott password email and redirect instruction has happened, an observer hooks into the postdispatch event of the action, checks if an success action (and no error message) is saved in the customer session and overwrites the redirect to redirect to the homepage.
Caveat: checking for the session messages is a bit hacky but there is no other way to tell whether the forgot password action was successful or not.
XML extension activation file app/etc/modules/Emzee_ForgotPasswordRedirect.xml
:
<?xml version="1.0"?>
<config>
<modules>
<Emzee_ForgotPasswordRedirect>
<active>true</active>
<codePool>community</codePool>
<depends></depends>
</Emzee_ForgotPasswordRedirect>
</modules>
</config>
XML extension configuration file app/code/community/Emzee/ForgotPasswordRedirect/etc/config.xml
:
<?xml version="1.0"?>
<config>
<modules>
<Emzee_ForgotPasswordRedirect>
<version>1.0.0</version>
</Emzee_ForgotPasswordRedirect>
</modules>
<frontend>
<events>
<controller_action_postdispatch_customer_account_forgotpasswordpost>
<observers>
<emzee_forgotpasswordredirect>
<class>emzee_forgotpasswordredirect/observer</class>
<method>setForgotPasswordRedirect</method>
</emzee_forgotpasswordredirect>
</observers>
</controller_action_postdispatch_customer_account_forgotpasswordpost>
</events>
</frontend>
<global>
<models>
<emzee_forgotpasswordredirect>
<class>Emzee_ForgotPasswordRedirect_Model</class>
</emzee_forgotpasswordredirect>
</models>
</global>
</config>
Observer app/code/community/Emzee/ForgotPasswordRedirect/Model/Observer.php
:
<?php
class Emzee_ForgotPasswordRedirect_Model_Observer
{
/**
* @param Varien_Event_Observer $observer
* @return Emzee_ForgotPasswortRedirect_Model_Observer
*/
public function setForgotPasswordRedirect(Varien_Event_Observer $observer)
{
$controller = $observer->getEvent()->getControllerAction();
$sessionMessages = Mage::getSingleton('customer/session')->getMessages();
if ($sessionMessages->count(Mage_Core_Model_Message::SUCCESS) > 0 &&
$sessionMessages->count(Mage_Core_Model_Message::ERROR) === 0) {
$controller->setRedirectWithCookieCheck('/');
}
return $this;
}
}
If you want to redirect to the checkout instead to the homepage, replace
$controller->setRedirectWithCookieCheck('/');
with
$controller->setRedirectWithCookieCheck('checkout/onepage');
Best Answer
You said guest checkout is enabled in your system but authentication pop up doesn't appear when you have guest checkout enabled. Go to Stores->Configuration->Sales->Checkout. Under Checkout options make sure Guest checkout is set to yes. Authentication pop up can also appear if your cart has a digital product.
Now to answer your question as to how to redirect customer where he intended to go: Overide
Magento_Customer/js/view/authentication-popup.js
with your theme or custom module. Line that will interest you isPass your redirect url instead of null to loginAction function. You will find implementation of loginAction in file
vendor/magento/module-customer/view/frontend/web/js/action/login.js
.You can decide your redirect url based on which button was clicked. Hope that helps.