Blank Screen when emailing invoice

When i try to send an emailed invoice, it forwards me to blank screen, this happens when sending via smtp , phpmail or sendmail , any ideas?

Thanks,
Sam.

Please post the last lines of the app logs from /application/logs/
And do you have access to your webserver logs?

I do yes, but not right at this second, this is what was in the App log , any ideas?

ERROR - 2015-02-23 07:21:02 --> Severity: Notice  --> Undefined index: port /home/webbhost/public_html/fixedseating/application/helpers/mpdf/mpdf.php 11427
ERROR - 2015-02-23 07:21:02 --> Severity: Notice  --> Undefined index: port /home/webbhost/public_html/fixedseating/application/helpers/mpdf/mpdf.php 11427
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: BODY /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: BODY>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined offset: -1 /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1156
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: DIV /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: DIV>>ID>>HEADER /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: DIV /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: ID>>HEADER /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1009
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: DIV>>ID>>HEADER /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: direction /home/webbhost/public_html/fixedseating/application/helpers/mpdf/mpdf.php 17375
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TABLE /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TABLE>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TABLE>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: port /home/webbhost/public_html/fixedseating/application/helpers/mpdf/mpdf.php 11427
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TABLE /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TABLE>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TABLE>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TBODY /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TBODY>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TBODY /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TBODY>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>COLOR-N /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>COLOR-N /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>COLOR-N /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>COLOR-N /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: CLASS>>COLOR-N /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 975
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>TEXT-RIGHT /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>CLASS>>COLOR-N /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1013
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TD>>ID>> /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 1017
ERROR - 2015-02-23 07:21:03 --> Severity: Notice  --> Undefined index: TR /home/webbhost/public_html/fixedseating/application/helpers/mpdf/classes/cssmgr.php 972

And that just carries on for a while, but as a new user it wont let me upload a file :frowning:

Well the mPDF library is pretty annoying sometimes. Lots of idot errors…
Just a question: do the mails arrive?

@jadaw1n could you take a look?

Thanks for the quick response, thyey dont, i am running another version on the same webserver under a different directory, and that sends email just fine, if thats any help!

Sam

Any ideas guys ?

Have now updated the app to 1.2, and error was still there tried a fresh install and email worked fine, changed the database to my production one and wont email? Please dont say i have to start again!!!

So it seems like its a database problem.
Do you use any special language specific characters in your invoices?
Could you please say which email settings do you use?

Another thing: if you have access to the server logs please copy them and share them with us. You can use pastebin.com for this.

Have just run a compare on the two database schemas and the only difference was the working clients table was MyISAM and the non working was InnoDB? No special language characters as far as i can see! Which server logs do you think i should look at ?

Sam

Okay…
Could you please make a backup and change all tables from InnoDB to MyISAM? Just to make sure that this is not the problem.

I mean the Apache error logs but they are not available for some hosting environments. Just take a look, maybe we find the error there.

Another thing you could do if this is not working:
Open this file /application/helpers/mpdf_helper.php and change

$mpdf->WriteHTML($html);

to

error_reporting(E_ALL & ~E_NOTICE);
$mpdf->WriteHTML($html);

and try again.

If this is not working I’m out if ideas… :worried:

think i may have found me an error! The first one says it is looking in the root directory/home but it is in a sub directory called fixedseating, any ideas?
Thanks!

[error] [client 178.62.76.201] File does not exist: /home/webbhost/public_html/home 

[Thu Mar 05 11:43:22 2015] [warn] [client 77.103.141.115] mod_fcgid: stderr: PHP Fatal error:  Call to a member function format() on a non-object in /home/webbhost/public_html/fixedseating/application/helpers/date_helper.php on line 78, referer: http://www.webbhost.co.uk/fixedseating/mailer/invoice/76

Seems to be a problem with dates. Which date format do you use?

05-03-2014 , same as my other invocing system on the same server, do you think it could be a problem with a bad date in one of the tables ?

Yes I think so.
Please put the following code in the /application/helpers/date_helper.php on about line 77:

var_dump($date);exit;

So it looks like this:

$date = DateTime::createFromFormat('Y-m-d', $date);
var_dump($date);exit;
return $date->format($CI->mdl_settings->setting('date_format'));

Then run the printing again and post the output here or via pastebin.com

This is what i get …

Invoice Date: object(DateTime)#63 (3) { [“date”]=> string(19) “2015-01-12 13:04:10” [“timezone_type”]=> int(3) [“timezone”]=> string(16) “America/New_York” }

I don’t get it… I mean this is an object but the error says it not!!!


Edit: Okay I searched the web for this and I found something that may be helpful.
Replace the code from above with this:

$date = DateTime::createFromFormat('Y-m-d', $date);
print_r(DateTime::getLastErrors());exit;
return $date->format($CI->mdl_settings->setting('date_format'));

and post the output again. I hope this will help.

If your confused , i really i have no chance! This is what i get with that liitle modification!

Invoice Date: Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 0 [errors] => Array ( ) )

0 errors is the bit i think you dont want to see ? !

No its not. Im out of ideas at the moment. Maybe another dev could take a look?

@cz_vilda @Jadaw1n @lommes @CarlosDom @egrueda

Was anyone able to reproduce this issue?
Or maybe an environment-related (php config/version) issue?