Support

Home Forums Event Espresso Premium EE4 PDF Invoice not working

EE4 PDF Invoice not working

Posted: January 26, 2015 at 10:51 am

Viewing 18 reply threads


Ray

January 26, 2015 at 10:51 am

Hi

I just received an error, that the PDF cannot be created – tested with Safari & Chrome.
Screen shows ” Error while creating PDF ”

Using latest EE4 technology.

Please advice

Thanks
Ray


Tony

  • Support Staff

January 26, 2015 at 12:55 pm

Hi Ray,

Can you link us to an event we can run some test registrations on please?


Ray

January 26, 2015 at 1:04 pm

Hi Tony

Sorry, need to be more precise.

Front end is fine. Its the Transaction Overview page – the link to the PDF in each transaction.

What you need?


Lorenzo Orlando Caum

  • Support Staff

January 26, 2015 at 2:58 pm

Hi there Ray,

Could you try enabling WP debugging with the following macro in your wp-config.php file?

https://gist.github.com/848801a1173be464fbe7

Then try viewing a few PDFs on the transactions overview screen.

Next go to this location using an SFTP or FTP client:

/wp-content/debug.log

Any messages related to the PDF there?

Be sure to turn off WP debugging after running the test above. Set true to false in the beginning of the macro.

Thanks


Lorenzo


Ray

January 26, 2015 at 3:12 pm

[26-Jan-2015 22:11:07 UTC] PHP Warning: DOMNode::cloneNode() [domnode.clonenode.php]: ID invoice already defined in /home/popoolar/www/mindgroup-professionals.ch/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/frame_decorator.cls.php on line 453
[26-Jan-2015 22:11:07 UTC] PHP Warning: DOMNode::cloneNode() [domnode.clonenode.php]: ID invoice already defined in /home/popoolar/www/mindgroup-professionals.ch/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/frame_decorator.cls.php on line 453


Tony

  • Support Staff

January 27, 2015 at 2:29 am

Hi Ray,

Unless your server is set to display errors regardless of WP_Debug then those warnings should not be prevent the PDF from being created.

Just to confirm are you using EE4.4.8?

Have you made any changes to your Receipt/Invoice Templates?

I have a couple of tests you can run so we can narrow this down a little.

Instead of clicking on the Invoice icon within right click and copy the URL, then in paste the URL within a new tab.

You’ll see &receipt=true on the end of the URL, remove that and press enter.

Do you then see PDF output to the screen?


Ray

January 27, 2015 at 2:43 am

Hi Tony

Yes. I am using 4.4.8.p
There are no changes being made on the templates.

I removed the parameter from the URL and get the same error.


Tony

  • Support Staff

January 27, 2015 at 3:16 am

Ok, thanks.

Now try, using the same URL, changing ?ee=launch_invoice to ?ee=download_invoice and retry.

You can also try ?ee=download_invoice with and without the receipt parameter.


Ray

January 27, 2015 at 3:31 am

Thanks.
download_invoice works. I get the order confirmation pdf.


Tony

  • Support Staff

January 27, 2015 at 8:15 am

Hi Ray,

Would it be possible for me to take a look at the admin? If so please send temporary login details using this form:

https://eventespresso.com/send-login-details/

It looks like something is interfering with the HTML output for the PDF.


Ray

January 29, 2015 at 1:34 pm

Hi

Any update on your side?

Thanks
Ray


Tony

  • Support Staff

January 30, 2015 at 11:16 am

Hi Ray,

Apologies for the delay.

The login credentials you have provide appear to be incorrect, can you re-check and re-send using this form once again please:

https://eventespresso.com/send-login-details/


Ray

January 30, 2015 at 12:10 pm

Hi Tony

All good.
Just send you new login details.

Regards
Ray


Tony

  • Support Staff

January 30, 2015 at 1:33 pm

Hi Ray,

Do you currently have WP_Debug enabled?

When downloading the PDF, if you view it within a something like SubLime Text you’ll see there is a warning being output the page.

Warning:  DOMNode::cloneNode() [domnode.clonenode.php]: ID invoice already defined in /wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/frame_decorator.cls.php on line 453

We have been investigating this warning to try and find the cause, however, you may want to set your server to log errors rather than outputting them to the screen on a production site.

I would recommend using something like this:

define( 'WP_DEBUG', true ); // Or false
if ( WP_DEBUG ) {
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );
}

Which will log the errors but not display them.


Ray

January 30, 2015 at 1:43 pm

Thanks. I changed it.
Anything else I need to do?


Tony

  • Support Staff

January 30, 2015 at 1:53 pm

No, that should be all there is to it for this.

If you view the invoice now it will load in the browser and should work as expected.


Ray

January 31, 2015 at 1:52 am

Ok. Great.
So the error was caused by the debug mode, right?

Thanks and keep up the good work
Ray


Tony

  • Support Staff

January 31, 2015 at 6:22 am

So the error was caused by the debug mode, right?

Yes the reason the PDF’s would not load is because WP_Debug was enabled, meaning the site would output warnings/errors to the page, this happened on the launch PDF view which caused the browser not to understand the PDF.

The reason for the warning we are still investigating as it appears to happen for some users and not others.

That snippet I provided earlier sets WP_Debug to log errors and not display them. It also sets disply_errors on your server config to 0 (false) for good measure.


Ray

January 31, 2015 at 6:58 am

Ok. I see. Thanks for supporting.

Regards
Ray

Viewing 18 reply threads

The support post ‘EE4 PDF Invoice not working’ 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