Page 1 of 1

Obtaining a blank page when registering.

Posted: Wed May 13, 2015 4:08 pm
by gabrielmoon
Hey there!
I am having a bit of an issue where when I or someone else tries to create an account on my store we obtain a white screen after submitting. When I check on the admin side of things the account has been created. I saw where this was an issue in 1.5, but I wanted to see if anyone else has experienced this and if there was a fix to it. I don't want to get in there and start messing with code without advice! Thank you in advance for any help that can be offered!

Re: Obtaining a blank page when registering.

Posted: Wed May 13, 2015 6:08 pm
by qahar
What is your specific oc 2.0 version? 2.0.1.0 behave differently from 2.0.2.0

Based on your explanation, the model is triggered but somehow the rest code of it make them break.

Do some debuging step below:
- Set Compression Level to "0" in System > Setting
- Then add code below to /index.php

Code: Select all

ini_set('display_errors', 1);
ini_set('log_errors', 1);
error_reporting(E_ALL);
White screen is hard to debug since they not give us any clue.
Step above should help to show the error message.

Re: Obtaining a blank page when registering.

Posted: Wed May 13, 2015 6:33 pm
by OSWorX

Re: Obtaining a blank page when registering.

Posted: Wed May 13, 2015 7:35 pm
by qahar
OSWorX wrote:Maybe it could be that: https://github.com/opencart/opencart/issues/3009
Yes that might be the cause. It's odd only error on some server

Re: Obtaining a blank page when registering.

Posted: Wed May 13, 2015 10:45 pm
by gabrielmoon
Hey there!

Sorry I did not put the version it totally slipped my mind. I have 2.0.2.0. I did add the code you where talking about, and this is what I got: Notice: Error: E-Mail to required! in /home/sunandmo/public_html/system/library/mail.php on line 61. I am assuming I need to enter an email address somewhere, but where lol?

Re: Obtaining a blank page when registering.

Posted: Wed May 13, 2015 10:53 pm
by OSWorX
This 'error' comes when admins should be notified.
So i would say we are talking about adding additionally email addresses in the field Settings > YOU SHOP > System > TAB Email > Additonal Adresses (or what it is called in English).

Re: Obtaining a blank page when registering.

Posted: Wed May 13, 2015 11:09 pm
by gabrielmoon
I got it fixed. I did a little bit more research, and found out what needed to be done. If anyone else has this issue here is what to do:
go to catalog/model/account/customer.php

At around line 78 - 80 you will find the following part of code:

$mail->setSubject($this->language->get('text_new_customer'));
$mail->setText($message);
$mail->send();

Replace this with the following:

$mail->setSubject($this->language->get('text_new_customer'));
$mail->setText($message);
$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($this->config->get('config_name'));
$mail->send();

And this should correct the issue!