Support

Home Forums Event Espresso Premium Icons on PDF Invoice

Icons on PDF Invoice

Posted: March 26, 2018 at 12:18 am


District73Toastmasters

March 26, 2018 at 12:18 am

The logo and map appear on the Confirmation Receipt, but not the icons (error message is: Image not found
https://d73.toastmasters.org.au/wp-content/plugins/event-espresso-decaf/core/templates/global_assets/images/calendar_year-24×24.png.

When I download the PDF, it then doesn’t show the map, logo or icons.

Any thoughts on why it’s not accessing and downloading these images?

Thanks,

Darrell.


Tony

  • Support Staff

March 26, 2018 at 3:04 am

Hi Darrell,

The links for your icons are using decaf:

/wp-content/plugins/event-espresso-decaf/core/

Your site currently has the regular version of EE installed so those paths aren’t valid.

I’m guessing you installed decaf first and then upgrade to regular, what happens with the above is decaf sets up the message templates and then saves them to the database (meaning the above URL’s use the decaf directory), then when you switch to regular those URls need to be altered.

If you have not modified the Receipt template the quickest way to fix is to go to:

Event Espresso -> Messages -> Default message templates -> Receipt.

In the side bar you’ll see a ‘reset templates’ button, click that and EE will regenerate the Receipt using the correct path.

If you’ve edited the templates, don’t click that button as you’ll need to update the links manually. Set all of the editors to text mode and do a search in your browser for ‘event-espresso’ – http://take.ms/OKBS0

You’ll find 4 references, 1 in EVENT_LIST and 3 in TICKET_LIST.

Update those from event-espresso-decaf to event-espresso-core-reg and save and retest.


District73Toastmasters

March 26, 2018 at 3:41 am

The first part has worked a treat. I got as far as hitting the ‘reset templates’ button. The icons now display correctly. When I click on ‘Download PDF’ they still give me that same error. Should I have done these steps as well:

‘Set all of the editors to text mode and do a search in your browser for ‘event-espresso’ – http://take.ms/OKBS0

You’ll find 4 references, 1 in EVENT_LIST and 3 in TICKET_LIST.

Update those from event-espresso-decaf to event-espresso-core-reg and save and retest.’

Or was that only if I’d reset the templates (which I don’t think I’ve done)?


Tony

  • Support Staff

March 26, 2018 at 3:43 am

Should I have done these steps as well:

No, thats only if you have not reset the template.

You get exactly the same error as above when downloading the PDF?

Can you link me to a Receipt for a test registration so I can view this?


District73Toastmasters

March 26, 2018 at 3:57 am

It has been partially fixed (thanks). Here’s a link to the event. It’s a dummy event so you can put in any info you want to test it:

https://d73.toastmasters.org.au/resources/training-and-education/

When you click on ‘View Full Order Confirmation Receipt’ the icons now display correctly. It’s when I click on ‘Download PDF’ that I look at the downloaded document and they have disappeared again. Interestingly, so has our logo.


Tony

  • Support Staff

March 26, 2018 at 4:34 am

Ok, that’s not the same error, notice how the links now show the correct path (and work in HTML) – http://take.ms/G2Ebi

Usually when this happens it’s because either your host has allow_url_fopen disabled on the server which is required by DOMPDF to pull the images (you’ll need to contact them and confirm this), or if you have iThemes security you’ll need to disable the “Enable HackRepair.com’s blacklist feature” within iThemes Security Pro.


District73Toastmasters

March 27, 2018 at 1:46 pm

Now I have an answer back from the web hosting company (Studiopress, FYI). This is what they had to say:

‘You will want to verify with the plugin author that it does not require the exec() / exec.php or url_fopen functions, as both of those have been disabled on Studiopress hosting for security reasons.

We do support CURL as an alternative to url_fopen. Your plugin author should know if they are using these functions or not.’

Is there some way around this? Possibly disabling the icons completely?


Tony

  • Support Staff

March 28, 2018 at 2:24 am

It’s not just the icons, it’s basically an ‘external’ file used to generate the PDF’s but by external I don’t mean hosted on another server, any file that needs to be included within the main content (CSS, images etc) will all use allow_url_fopen within DOMPDF.

That means that even if you removed the images, your Invoice’s will not look the same as the HTML view as the CSS files can’t be used etc.

We do support CURL as an alternative to url_fopen. Your plugin author should know if they are using these functions or not.

Whilst that would be great if it was our own code, it’s not, it’s an external library we use that is specifically for generating PDF’s. Rewriting/creating our own library specifically for this task is not something we are considering as it’s a huge project in itself with little benefit when it’s already been created.

In short, if your host will not enable the above functions you either can’t use the PDF functions unless you are happy with the unstyled versions, or will need to move hosts.


District73Toastmasters

March 28, 2018 at 2:25 pm

Thanks Tony.

I’m fine with not using the PDF functions. How do I disable them?


Josh

  • Support Staff

March 28, 2018 at 2:36 pm

You can disable the PDF functions by going to Event Espresso > Messages > Settings, then click PDF, then move the toggle switch to the left, which turns off PDF.

The support post ‘Icons on PDF Invoice’ 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