Support

Home Forums Event Espresso Premium Error on downloading PDF invoice

Error on downloading PDF invoice

Posted: September 8, 2015 at 7:47 am


Ieksejo Auditoru Instituts

September 8, 2015 at 7:47 am

Hello
I have EE 4.8.7.p
I get following error when downloading invoice:
Fatal error: Call to undefined method DOMText::getAttribute() in /home/iai/public_html/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/cellmap.cls.php on line 399


Tony

  • Support Staff

September 8, 2015 at 8:42 am

Hi there,

Have you modified the invoice/receipt templates at all?

Do you datetimes/tickets have very long descriptions?

Can you post a link to download the pdf so we can take a look please?


Ieksejo Auditoru Instituts

September 8, 2015 at 1:38 pm

Yes, it is modified template. I don’t think that names are too long.
Here is the event. Try to register and download invoice.
http://iai.lv/archives/events/ikgadeja-ieksejo-auditoru-instituta-konference


Tony

  • Support Staff

September 8, 2015 at 2:57 pm

The error basically means there is an issue with the HTML on that DOMPDF is attempting to parse.

Does the same happen if you use the default template?

To test you can create a new custom template, then within that custom template click the ‘Reset Template’ button to go beack to the default. Temporarily assign that to the event and try re-downloading the invoice.


Ieksejo Auditoru Instituts

September 9, 2015 at 12:34 am

Default template works fine. But i need my old one. It was working fine with previous version. After update it has stopped to work. What could be the issue?


Tony

  • Support Staff

September 9, 2015 at 5:09 am

DOMPDF is unforgiving when it comes the HTML structure, any invalid html will throw an error.

As your using a custom template you’ll need check the code is valid, try removing sections of the template to find which part is causing the error to be thrown.

Remove unneeded html from the tamplate, for example your image tag is wrapped in strong tags, DOMPDF may not like this.

You may want to run your code through a HTML validator and see if that points to any issues.


Ieksejo Auditoru Instituts

September 9, 2015 at 6:43 am

I’ve found the problem. Issue was that i was trying to put [ATTENDEE_LIST] after [TICKET_LINE_ITEM_LIST] in [TICKET_LIST] section. Once i remove it, PDF is downloaded correctly. But i actually need to have attendee list on the invoice. Preferably it should not be in TICKET_LIST, but if not possible, i would be glad if you could send me a hint how to put it correctly. Currently [TICKET_LIST] section was:
</td>
</tr>
[TICKET_LINE_ITEM_LIST] [ATTENDEE_LIST]
<tr>
<td colspan=”4″>

And that was wrong


Tony

  • Support Staff

September 9, 2015 at 7:07 am

On a default template the ATTENDEE_LIST section is empty, so have you edited that section and added further code?

If so What is in ATTENDEE_LIST section?

We can not provide support for custom templates but we can help point you in the right direction.


Ieksejo Auditoru Instituts

September 9, 2015 at 8:03 am

I have added [FNAME] [LNAME] on [ATTENDEE_LIST]

It actually worked with previous versions, but since last update (or last two) it has stopped.


Tony

  • Support Staff

September 9, 2015 at 11:58 am

Hi there,

I’ve created a ticket for some feedback from one of our developers on this.

Do you know what version you upgraded from? (The version that this worked in)

If you go to Event Espresso -> Maintenance -> System Information.

Within ‘Activation history’ scroll to the bottom, you can see the latest versions of EE you have installed.


Ieksejo Auditoru Instituts

September 10, 2015 at 12:12 am

I think last time i’ve checked it was 4.7.9.p version. Maybe next ones worked also, but i’m not sure as i was not testing it on next versions.

I have tested more. I’ve put [ATTENDEE_LIST] on [TICKET_LIST] section (as described before) and removed [FNAME] [LNAME] from [ATTENDEE_LIST] (it was empty now) and it worked fine. But once i put anything inside [ATTNEDEE_LIST] i get error.


Ieksejo Auditoru Instituts

September 10, 2015 at 12:24 am

And it is strange that it is allowed to put [ATTENDEE_LIST] into [EVENT_LIST] section in “Email Registration Pending Payment Template” or Email Not Approved Registration Template or Email Registration Approved Template but not allowed in invoice template


Tony

  • Support Staff

September 10, 2015 at 4:26 am

I’ve put [ATTENDEE_LIST] on [TICKET_LIST] section (as described before) and removed [FNAME] [LNAME] from [ATTENDEE_LIST] (it was empty now) and it worked fine. But once i put anything inside [ATTNEDEE_LIST] i get error.

The problem is adding output between [TICKET_LINE_ITEM_LIST] and the next table row (tr) is invalid html, so when you have [ATTENDEE_LIST] with an empty section it out puts nothing and therefore does not break the html.

And it is strange that it is allowed to put [ATTENDEE_LIST] into [EVENT_LIST] section in “Email Registration Pending Payment Template” or Email Not Approved Registration Template or Email Registration Approved Template but not allowed in invoice template

I have added this note to the ticket.


Ieksejo Auditoru Instituts

September 10, 2015 at 6:30 am

You are right, fixing of html did t he trick. However now [FNAME] and [LNAME] does not work properly. Formerly they were returning all attendee names. But now they are returning only primary registrant name. Do you have some hints what can be wrong and what should i look for or what way is correct?


Tony

  • Support Staff

September 11, 2015 at 2:57 am

In [TICKET_LIST], where have do you currently have [ATTENDEE_LIST]?


Ieksejo Auditoru Instituts

September 11, 2015 at 4:23 am

it looks like this:
<td>
<tr>
[TICKET_LINE_ITEM_LIST]
</tr>
<td colspan=”4″>
[ATTENDEE_LIST]


Tony

  • Support Staff

September 11, 2015 at 6:24 am

It appears there is an issue with using ATTENDEE_LIST within the invoice.

I can’t see any way to use that shortcode without either causing invalid HTML or it parsing to only the primary attendee within that section.

This will need further investigation, for the time being I would recommend removing that shortcode from the TICKET_LIST section.

The support post ‘Error on downloading 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