Getting error 500 when I try to print pdf in Quotes (Yes, I have mbstring enabled)

Hi I have an installation with this version:

Versión 7.14.4

Sugar Versión 6.5.25 (Compilación 344)

My instance is Ubuntu 20.04.6 LTS
PHP Version 8.2.15
mysql Ver 14.14 Distrib 5.7.42

I have followed this old 2019 post but the solution there doesn’t worked for me.

I can’t use any pdf printing method without getting the 500 error.

My main issue is that even with the php.ini error enabled, and SuiteCRM logs in debug mode, I couldn’t see what it is causing that error which could be a front-end error, I don’t know. I have tested both local and online environment.

Any help will be very much appreciated.

Check your PDF template and make it active.

A 500 error is a back-end error, and you likely have a FATAL error in one of your two logs…

Thanks for your quickly reply. I delete all my templates, create new ones and made a QR and the result is the same.

Like I said, none of my logs reflect the occurrence of any related with that process. I double checked all my php logs (I only have one host) and the SuiteCRM log as well.

It is working on the demo version.

Username: will
Password: will

https://demo.suiteondemand.com/index.php?action=Login&module=Users

Turn on display errors in your php settings. I find if the error is not in your PHP log and not in the SuiteCRM sometimes, you’ll get the error displayed on the screen.

How to do that? In php.ini file?

display_errors = On

Yep or in cpanel…

1 Like

Hi, thank you very much for your help.

After creating a new instance, this time with php 8.1.2 and Ubuntu 22 (just though that maybe was a problem of compatibility but it isn’t)

I have enable the errors reporting in php

Then enabled SuiteCRM logs to be Fatal, then Error, and finally Debug (check the file attached)

suitecrm_07_12_24.log.zip (6.8 KB)

And the browser just show me a blank screen:

But the console of my browser show me this:

So far I have commented code in order to discover the problem in the file entrypoints/generatedPdfQuotes.php and is seems that the problem is caused by the modules/AOS_PDF_Templates/PDF_Lib/mpdf.php but nothing else.

It is quite strange for a 500 error not to have errors in the PHP log. But when it happens, then it’s typically a web server crash - there might be something in the system logs.

I believe mPDF is deprecated since 7.13, if I am not mistaken. It shouldn’t be trying to call mPDF…

1 Like

It seems that my instance has the same background as the user who posted that “solution”. Mi instance has many updates. The user said that was able fix it but sadly doesn’t said how. Maybe the reason of my problem printing pdf is the same, since mpdf is the library that is casing the error but in the settings I have selected TCPDF as the only and default library. So how can I disable that old one to be called?

I had a breakthrough. It seems that previous versions had customization. I deleted that custom entry point and now the error is gone but now my templates are not detected, I enabled format selection but my templates are not showing up there. I have 4 Quote templates with type “Quotes” selected. Any ideas why my templates are not showing there?

I don’t know the answer, but perhaps an easier way of working around this is to create new templates and to copy-paste the contents from the old ones.

This can also be done directly in the database if you prefer.