Support

Home Forums Event Espresso Premium Invoice PDF button generating an error when clicked

Invoice PDF button generating an error when clicked

Posted: September 25, 2014 at 5:22 am

Viewing 12 reply threads


Kyle Nel

September 25, 2014 at 5:22 am

Hi Folks,

I have had a look and couldn’t fin any issues matching mine (though there are a few invoice-related threads on here).

I only get this error when selecting the invoice under the payment overview on the checkout. The button in the congratulations box works perfectly. The error I am getting is:

Warning: DOMNode::cloneNode(): ID invoice already defined in /home/flmtrain/public_html/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/frame_decorator.cls.php on line 453
Unable to stream pdf: headers already sent

You can test the issue at this link:

http://flmtraining.co.uk/thank-you/?e_reg_url_link=1-d86d88720ad05eef3e295181a4b98e37

Cheers


Dean

September 25, 2014 at 5:41 am

Hi Kyle,

What PHP version are you running on the server?


Kyle Nel

September 25, 2014 at 5:48 am

Hi Dean,

It is 5.5.16


Dean

September 25, 2014 at 5:55 am

Hi,

Thanks. Do you know or can you check if OPCache is enabled in your php.ini on your server?

This error is something I have never come across before, and even Google is struggling to advise on it. That being said I came across a similar issue where OPCache was enable and caused a similar error message.

https://pyd.io/f/topic/fatal-error-call-to-a-member-function-clonenode-on-a-non-object/
https://blogs.oracle.com/opal/entry/using_php_5_5_s


Kyle Nel

September 25, 2014 at 6:14 am

I have sent the question to the host as I don’t believe I can check it myself and querying php_info doesn’t seem to give me that information.

I’ll let you know as soon as I hear back from them.


Kyle Nel

September 25, 2014 at 6:31 am

Dean, I can confirm now that OPCache is disabled on the server.


Lorenzo Orlando Caum

  • Support Staff

September 25, 2014 at 10:26 am

Hi Kyle,

My background is not in server administration but did you restart the server processes to clear out any old cache?


Lorenzo


Kyle Nel

September 26, 2014 at 2:22 am

Hi Lorenzo, unfortunately I am on a shared environment so I cannot restart the server process.


Tony

  • Support Staff

September 26, 2014 at 2:47 am

Hi Kyle,

Do you have WP_Debug or error_reporting enabled on the site?

If so can you disable it an retry please?

The warning being thrown is not a major problem (although we have a ticket to investigate this) however, I think the reason no PDF is being produced is because that warning is being displayed. Which is why, if you notice below that error, you’ll see ‘Unable to stream pdf: headers already sent’.

The headers have been sent from the warning message.


Kyle Nel

September 26, 2014 at 6:02 am

Hi Tony,

Thank you for that. You are correct. I disabled error_reporting within wordpress as WP_Debug was already off. Tested and the download appears to be working correctly now.

I very much appreciate your time on this.


Tony

  • Support Staff

September 26, 2014 at 6:14 am

Just to note, if you would like to log the errors on the site you can use 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 );
}

That will store the error within debug.log within wp-content only when WP_Debug is enabled which allows you to debug.

For more information view here:

http://codex.wordpress.org/Editing_wp-config.php#Debug

Hope that helps.

  • This reply was modified 10 years, 2 months ago by Tony.


Kyle Nel

September 26, 2014 at 6:59 am

Now Tony, that is going the extra mile. I really appreciate you providing that extra information. Straight away that is really useful to me in a lot of situations.

Thank you very much. Have a great day.


Tony

  • Support Staff

September 26, 2014 at 7:38 am

No problem at all Kyle.

I’ll mark this thread resolved, if you run into any further issues, or have any further questions, feel free to open up another.

Thank you, and you too 🙂

Viewing 12 reply threads

The support post ‘Invoice PDF button generating an error when clicked’ 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