Support

Home Forums Event Espresso Premium Receipt & invoice PDF viewing issues

Receipt & invoice PDF viewing issues

Posted: March 20, 2019 at 5:19 am

Viewing 27 reply threads


Porter

March 20, 2019 at 5:19 am

We have a problem with our invoices & receipts. Whilst we can see them correctly in the backend, when the pdf’s are downloaded, the pdf’s are either blank or not displayed correctly. Do you know what could be causing this?


Tony

  • Support Staff

March 20, 2019 at 6:35 am

Hi there,

Can you link me to a test Invoice/Receipt I can download to view this, please?

My first guess would be allow_url_fopen is disabled on your server and you’ll need to contact your host to have them enable it for the PDF’s to function correctly, however we’ll need to see the PDF to know for sure.


Porter

March 20, 2019 at 10:55 am

This reply has been marked as private.


Tony

  • Support Staff

March 21, 2019 at 4:40 am

That’s strange.

Have you edited the invoice template at all?

If you go to Event Espresso -> Maintenance -> System information

Search for allow_url_fopen, what values do you have there?


Porter

March 21, 2019 at 6:32 am

Below are the settings:

allow_url_fopen
global_value 1
local_value 1
access 4
allow_url_include
global_value 0
local_value 0
access 4


Tony

  • Support Staff

March 21, 2019 at 6:33 am

Have you edited the invoice template at all?


Porter

March 21, 2019 at 6:37 am

This reply has been marked as private.


Porter

March 21, 2019 at 6:44 am

It’s a custom invoice that we are using


Porter

March 21, 2019 at 7:41 am

This reply has been marked as private.


Tony

  • Support Staff

March 22, 2019 at 7:54 am

Our client added the following to the invoice

Its possible, that when adding the details they’ve broken then HTML within the Invoice and thats causing issues with DOMPDF (which is used to generated the PDF’s) as its much less forgiving of invalid HTML.

It’s a custom invoice that we are using

Ok, so to clarify, when you say it’s a custom invoice, have you edited the template under ‘Default Message Templates’, or have you created a custom Invoice template within EE and now use that?

If you go to Event Espresso -> Messages -> Custom Message Templates (tab at the top) can you see your custom Invoice template there?

Just wondering – are the pdf’s stored on the site

They are not stored on the site and are generated on the fly when you click download.


Tony

  • Support Staff

March 22, 2019 at 8:00 am

Having a close look at your HTML version of the Invoice the HTML is invalid.

For example, there’s a closing p tag at the end of this text:

Please arrange payment into the bank account below. Payment must be received within a month of invoice date or more than 14 days prior to the course start date, whichever is sooner.

But there’s no opening tag at the beginning of it. That’s the kind of error that causes DOMPDF to fail.

The date course dates UL has no LI’s around the date list, again that’ll cause problems.

I suspect the issue is due to invalid HTML, the way to check would be to test the default EE invoice template, but how you do that (without losing your customizations) depends on how you’ve edited the template. If you let me know if you are using a default or custom template I can guide you on how to confirm the above, then you can work on correcting the HTML in your template it that’s the case.


Porter

March 22, 2019 at 8:02 am

Thanks for getting back to me. We’ve create a custom inovice which we are now using. The Default message is has not been used or edited.

I got to Event Espresso -> Messages -> Custom Message to edit the invoice template


Porter

March 22, 2019 at 8:51 am

Thanks Tony – I’d appreciate your help! As i mentioned we are using a custom template.


Tony

  • Support Staff

March 22, 2019 at 9:13 am

Ok, go to Event Espresso -> Messages -> Default message templates -> Invoice -> Edit Purchaser.

In the address bar you’ll see id=XX what number is shown?

To confirm, you’ve not edited the default invoice template at all?

  • This reply was modified 5 years, 6 months ago by Tony.


Porter

March 22, 2019 at 10:03 am

It’s id=16


Tony

  • Support Staff

March 22, 2019 at 10:22 am

That’s the ID used for the Invoice you sent me earlier, meaning it’s not using a custom template but using the default?


Porter

March 22, 2019 at 10:30 am

Apologies, I misread your reply. The custom invoice id is 16 but the default invoice it is 14


Tony

  • Support Staff

March 22, 2019 at 11:02 am

Ok, have you disabled that template?

It will say something like:

The template for Purchaser Recipient is currently inactive.

At the top next to a toggle, if so, please click the toggle to temporarily enable it.


Porter

March 22, 2019 at 11:29 am

I’ve just done this


Tony

  • Support Staff

March 22, 2019 at 11:47 am

Default template has also been edited, so testing on that is no good unless you reset it.

To cause the least amount of disruption, create a new custom template from the default one. Once you’ve created it, edit it and click the ‘Reset Templates’ button on that new custom template.

Then let me know the ID of that new custom template.

(Note you can disable the default one now if needed)


Porter

March 22, 2019 at 12:03 pm

Just checking – when I go to reset the new custom template, i get the following warning…. Are you sure you want to reset the html invoice message templates? Remember continuing will reset the templates for all contexts in this messenger and message type group.
Does this affect all the invoice templates? Is it ok to do this?


Tony

  • Support Staff

March 22, 2019 at 12:18 pm

Does this affect all the invoice templates?

No, it effects all of the contexts for the current template you are editing.

So, just to confirm, you should have a NEW custom invoice template and be editing that new template.

Clicking on the reset templates button within the editor for that template, affects all contexts for THAT template (Invoice only has one context, so it’s simple in that clicking to reset on an invoice template, resets that invoice template that you can see back to the default)

Is it ok to do this?

As long as your editing the custom template yes.

The worst that can happen is your invoice is reset to default and you need to re-apply your customizations again, but tbh, it’s likely you’re going to need to fix the template anyway as its invalid.


Porter

March 22, 2019 at 12:24 pm

Thanks for clarifying – i’ve reset it now. The new template id is 34


Tony

  • Support Staff

March 22, 2019 at 1:11 pm

Is that template active?


Porter

March 23, 2019 at 5:15 am

This reply has been marked as private.


Porter

March 25, 2019 at 5:17 am

I’ve been working on the new template. Something odd is going on. I’ve reset the “New invoice template” and have tested it out wihtout changing anything but the pdf is still blank.


Porter

March 25, 2019 at 5:22 am

This reply has been marked as private.


Tony

  • Support Staff

March 25, 2019 at 6:08 pm

I’m often getting Network errors when trying to download the PDF, no idea why but that might be another clue.

Try removing the [INVOICE_PAYMENT_INSTRUCTIONS] shortcode from your new template and test it then.

Viewing 27 reply threads

The support post ‘Receipt & invoice PDF viewing issues’ 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