Reply To: Fatal Error when exporting as PDF or DOC or XLS

#921
marcnyc
Participant

I have upgraded to 2019.2 but wanted to report the problem still exists and I have tried with different PHP version:

PHP 7.0:
COMPLETELY BLANK Screen with this error:
Fatal error: Uncaught TypeError: Return value of Inc\Claz\Export::setFormat() must be an instance of Inc\Claz\void, none returned in /home/marcurse/public_html/invoices/Inc/Claz/Export.php:504 Stack trace: #0 /home/marcurse/public_html/invoices/modules/export/invoice.php(20): Inc\Claz\Export->setFormat('pdf') #1 /home/marcurse/public_html/invoices/index.php(375): include('/home/marcurse/...') #2 {main} thrown in /home/marcurse/public_html/invoices/Inc/Claz/Export.php on line 504

PHP 7.1 and 7.2:
CORRECT SCREEN PREVIEW of the invoice but this error at the bottom:
Fatal error: Uncaught Error: Call to undefined function urlsafe() in /home/marcurse/public_html/invoices/include/smarty_plugins/function.online_payment_link.php:24 Stack trace: #0 /home/marcurse/public_html/invoices/tmp/template_c/1e18b8cd6ed35e267d48e8afc9d384159268ffd2_0.file.template.tpl.php(657): smarty_function_online_payment_link(Array, Object(Smarty_Internal_Template)) #1 /home/marcurse/public_html/invoices/library/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5ef0f1b8cd8265_46264209(Object(Smarty_Internal_Template)) #2 /home/marcurse/public_html/invoices/library/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template)) #3 /home/marcurse/public_html/invoices/library/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template)) #4 /home/marcurse/public_html/invoices/library/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_ in /home/marcurse/public_html/invoices/include/smarty_plugins/function.online_payment_link.php on line 24

Additionally, when you are in the main invoices managment view (with the list of invoices) I noticed that clicking on the PDF export icon in the first column downloads a file with name “pdf” but no extension… if I add a pdf extension and open it it shows an empty invoice with no dollar amount, today’s date, the Simple Invoices logo (instead of my logo) and the wrong biller (instead of the default biller).

If I can help trouble shoot this please let me know.
Happy to help