Buy Now
Sign in

TCPDF Output Error

BBplayer , December 20 2016
B
BBplayer
Hello,

I've just downloaded Chronoforms 5 for Wordpress and installed TCPDF action. Otherwise when I press my submit button the PDF won't be generated and the page shows me an error:

Warning: Invalid argument supplied for foreach() in (path)\wp-content\plugins\chronoforms\front\chronoforms\libs\form.php on line 98
TCPDF ERROR: Some data has already been output, can't send PDF file


How to solve it?

Thanks
GreyHead
Hi BBplayer,

Hmm, I've never had to use the TCPDF action on WordPress. If you set the action to save to the server instead of immediate download does it then work?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
B
BBplayer
No, it doesn't work
GreyHead
Hi BBplayer,

Bother . . . I'll see if I can get it to work on my WP test site.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
GreyHead
Hi BBPlayer,

After some digging I think I have solved this - it's a CF bug :-( A few months ago Max changed the 'action' identifier code from {N} - which caused an odd JavaScript warning - to _XNX_ He changed all the actions to use this BUT it looks as though he didn't update the WP version of ChronoForms to match.

The right answer is for Max to do the update. Meanwhile as a workaround you can edit the file /wp-content/plugins/chronoforms/admin/chronoforms/actions/tcpdf/tcpdf.php and do a global search and replace switching _XNX_ back to {N} (If you like I can email you a copy of the file that I have edited).

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much