Support

Home Forums Event Espresso Premium Invoice – Download PDF

Invoice – Download PDF

Posted: March 2, 2022 at 11:58 am

Viewing 7 reply threads


CVJS

March 2, 2022 at 11:58 am

Until recently everything was working perfectly for customers, all able to download, print and pay their invoices via our website.
Very recently a few people emailed to say that the invoice is indeed generated, but when clicking on the ‘Download PDF’ button at the top of the screen, the following error loads without the PDF downloading:
There has been a critical error on this website.
Learn more about troubleshooting WordPress.

We have already added code to our wp-config to increase memory and now, at a loss.

Look forward to your advice, thanks.


Tony

  • Support Staff

March 4, 2022 at 4:39 am

Hi there,

Has anything changed on the site?

My guess from the above is that your server has been updated to use PHP8 and currently the library we use for generating PDF’s is not PHP8 compatible.

Go to Event Espresso -> Maintenance -> System information

On that page, search for ‘PHP version’, is it 8.X+? If so you’ll need to switch down to PHP7, most hosts provide a way to do that within your control panel but if not you’ll need to contact them and ask them to switch the version for you.

We are working on making Event Espresso PHP8 compatible in a future version.


CVJS

March 8, 2022 at 2:48 am

This reply has been marked as private.


Tony

  • Support Staff

March 8, 2022 at 3:05 am

Hmmm, ok.

So I can’t see anything from that error that helps here, that’s a ‘front facing’ error that doesn’t include any additional details. However, it means a Fatal error is being thrown and that should be stored within your server’s error logs.

If you check your host’s control panel does it have an option to view PHP errors for the site? If so check there for any errors from Event Espresso on today’s date.

Do you have FTP/File manager access?


CVJS

March 8, 2022 at 5:26 am

This reply has been marked as private.


Tony

  • Support Staff

March 8, 2022 at 6:11 am

Ok, so if you access to the files, the first thing I would do is enable WP_DEBUG_LOG within wp-config.php

We have a snippet for this here:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

You edit your wp-config.php file for the site, usually you’ll have define( 'WP_DEBUG', false); somewhere in there.

Replace that single line with the snippet above, that enabled WP_DEBUG mode, but sets it to log the errors rather than display them on the page itself.

However, your site already has a debug.log file within /wp-content/ which is fairly large and either old or large enough for the browser to timeout before it displays the full file.

So either rename that file to debug.log2 so that a new debug.log is created with the above, or delete the current debug.log file completely and start fresh.

Are these stored in a specific place or can I get a plugin for WordPress?

Usually stored within an error.log or error_log file in the root directory but it depends on the server setup, you may not have one at all. The above method can be used to create a publicly accssible file I can view to see the errors.


CVJS

March 9, 2022 at 9:00 am

This reply has been marked as private.


Tony

  • Support Staff

March 9, 2022 at 9:43 am

The error being thrown is:


PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string + float in //wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/src/Renderer/Inline.php:153

That’s an error we see with PHP8 so I checked the headers on your site, they return PHP/8.0.16

See here: https://monosnap.com/file/vqv5MTPwMayktBtJmAJG6ODDBN1uN4

You’ll need to switch the PHP version in use on the site down to PHP7.4 to prevent the above error.

Viewing 7 reply threads

The support post ‘Invoice – Download PDF’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso