How to stop the depreciated mPDF module from being called?

SuiteCRM 7.14.3
PHP 8.1
Ubuntu 22.04

Hello community,
the mPDF is spamming errors due to no longer supported syntax and I am looking for a safe way to disable it.

Edit: I seem to have tracked down the issue. Despite no longer existing in the PDF modules list, the mPDF module was still being called as PDF handler. Selecting the TCPDF Engine again and saving appears to have stopped that behavior.

Please post the errors, the exact text.

Apache2 log:

[Tue Mar 12 13:13:13.795746 2024] [proxy_fcgi:error] [pid 40164] [client 10.49.1.250:19643] AH01071: Got error 'PHP message: PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /var/www/CRM/modules/AOS_PDF_Templates/PDF_Lib/mpdf.php on line 2138', referer: https://crm.blah.com/index.php?action=ajaxui

In the Browser I get Error 500.

You shouldn’t need to remove it. It’s deprecated, and the code should not be called from anywhere. The question is, which code is calling that?

If you can get a stack trace on the error, we can find out.

Which log do you need? I haven’t seen errors related to this module in any other log, just the error 500 in the browser if I try to print a PDF from the Accounts or Invoices modules.

I don’t need a log, I need a stack trace. My experience in these forums is that either you are a developer and understand what a stack trace is, or you won’t be able to get one and this conversation won’t go anywhere. Sorry. I made this PR to avoid all this wasted time in the forums:

but it’s been 4 years and it hasn’t been merged. I guess my time here is not considered valuable.

sorry :man_shrugging:

Mate, that’s kind of rude. Just say that you want the suitecrm log with advanced logging. This isn’t a daytime drama.

Sorry, didn’t mean to come off as rude, and definitely not to you - I am a bit mad, though not at you, and I guess that possibly transpired in my reply. My apologies.

This was just yesterday. I have 10 replies there, and I did not get my stack trace. This often happens to me here in these forums. I don’t blame people - this should really be easier than it is.

Is your 7.14.3 instance upgraded from lower versions? Did you faced same issue on a fresh install.

This was definitely an update issue after going from 7.3 to 7.4 and changing the PHP version from 8.0.50 to 8.1 to maintain compatibility.

This installation was upgraded multiple times over the years. I have tracked the issue down to the update that removed mPDF from the dropdown selection without activating an alternative PDF handler. Unfortunately I don’t have the resources to mount older backups for a closer analysis right now as our infrastructure is at maximum provisioning.

@pgr that logging code improvement would be very helpful for the community. Great work! Let’s hope the Devs do include it soon.

1 Like