Forums

Joomla 3.5.1 - TCPDF no longer working

MainsailSoftware 21 Apr, 2016
Please see this post: http://www.chronoengine.com/forums/posts/f9/t101698/joomla-3-5-1-tcpdf-not-work.html

I am having exactly the same issue. The TCPDF Action no longer lets existing actions to be edited, nor new ones to have their parameter setup.

Is there any progress on fixing this?

I have a pretty urgent need to get this working again!
GreyHead 22 Apr, 2016
Hi MainsailSoftware,

I have sent you a PM with a link to a 'fixed' version.

Bob
koppie7 24 Apr, 2016
Same problem here on Joomla 3.5.1, TCPDF doesn't work anymore.
Please help
GreyHead 24 Apr, 2016
Hi koppie7,

I sent you the download link in a PM.

Bob
parsifaltheking 26 Apr, 2016
Same problem here on Joomla 3.5.1, TCPDF doesn't work anymore.

Please help
teldrive 27 Apr, 2016
Hi Bob can you send me it to me too
GreyHead 27 Apr, 2016
Hi,

Two more PMs sent

Bob
teldrive 27 Apr, 2016
I tested on chrome && explorer but it's not working for me
GreyHead 27 Apr, 2016
Hi Teldrive,

You are the first user it hasn't worked for. What versions of CF, Joomla! and PHP are you using?

Bob
teldrive 28 Apr, 2016
Hi Bob,
I have
php 5.4.45
joomla 3.5.1
and Chronoforms_V5.0.11
let me comment that only I have the image sent before after second click on tcpdf action
(I tested in explorer and in chrome)
GreyHead 28 Apr, 2016
Hi Teldrive,

If you can please look at the file /administrator/components/com_chronoforms5/chronoforms/actions/tcpdf/tcpdf.php

Around line 207 you should see code like this
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][pdf_author]
or like this:
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][pdf_author]

The updated version should have the second version of the code with [_XNX_]

If that is correct, then by all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.

Bob
giusebos 28 Apr, 2016
Same problem here on Joomla 3.5.1,
chronoforms 5.0.11
php 5.5.9
MySql 5.5.40

TCPDF doesn't work anymore.
giusebos 28 Apr, 2016
I do not understand, it should be replaced even in that string


echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][pdf_title].........
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][pdf_subject].........
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][pdf_keywords].......
etc...etc.....

GreyHead 28 Apr, 2016
Hi Guisebos,

I've sent you a PM with a link to download an updated version. Here we're trying to workout why that isn't working for Teldrive. It apparently has for everyone else who has used it.

Bob
giusebos 28 Apr, 2016
thank you so much
giusebos 28 Apr, 2016
good, it works well
giusebos 29 Apr, 2016
I only have a problem:
in the link to download the pdf file is the server's absolute path
I have not added anything of the path box
if I change my path, tcpdf not save the file
GreyHead 29 Apr, 2016
Hi giusebos,

You probably want the URL to download not the path - but I'm not clear exactly what the problem is?

If you add a path it needs to be absolute and writeable (and may need to have an index,html file in the folder).

Adding a DeBugger action after the TCPDF action might give you some useful info - though it will show nothing if the TCPDF action is set to download.

Bob
giusebos 29 Apr, 2016
Data Array

Array
(
    [option] => com_chronoforms5
    [chronoform] => questionario_pdf
    [event] => submit
    [nome] => pippo
    [cognome] => bho
    [eta] => 34
    [istruzione] => medie
    [salva] => salva
    [pdf_file] => pdf_file_20160429125843.pdf
)





Array
(
    [pdf_file] => Array
        (
            [name] => pdf_file_20160429125843.pdf
            [path] => /var/www/vhosts/vps000.ovh.net/my_site.com/components/com_chronoforms5/chronoforms/pdfs/questionario_pdf/pdf_file_20160429125843.pdf
            [size] => 0
            [link] => /var/www/vhosts/vps000.ovh.net/my_site.com/components/com_chronoforms5/chronoforms/pdfs/questionario_pdf/pdf_file_20160429125843.pdf
        )

)


Errors

Array
(
)

Debug Info

Array
(
    [4] => Array
        (
            [TCPDF] => Array
                (
                    [0] => /var/www/vhosts/vps000.ovh.net/my_site.com/components/com_chronoforms5/chronoforms/pdfs/questionario_pdf/pdf_file_20160429125843.pdf has been saved correctly.
                )

        )

)
giusebos 29 Apr, 2016
this


 [link] => /var/www/vhosts/vps000.ovh.net/my_site.com/components/com_chronoforms5/chronoforms/pdfs/questionario_pdf/pdf_file_20160429125843.pdf


it should be


 [link] => http://www.my_site.com/components/com_chronoforms5/chronoforms/pdfs/questionario_pdf/pdf_file_20160429125843.pdf
giusebos 29 Apr, 2016
my custom code


<?php
$form->data['pdf_link'] = "<a href='{$form->files['pdf_file']['link']}' >download</a>";
?>
GreyHead 29 Apr, 2016
Hi giusebos,

Thank you - I thought that had been fixed a long time ago, but it hasn't (or maybe I used an old version). I have updated the version in DropBox and noted the changes below.

Bob

Bug fix: Open the file /administrator/components/com_chronoforms5/chronoforms/actions/tcpdf/tcpdf.php and look for this block of code around line 170
			//Try to generate an auto file link
			$site_link = \GCore\C::get('GCORE_FRONT_URL');
			if(substr($site_link, -1) == "/"){
				$site_link = substr_replace($site_link, '', -1);
			}
			if ( strlen(trim($config->get('pdf_post_name', ''))) > 0 ) {
				$form->files[trim($config->get('pdf_post_name', ''))] = array('name' => $PDF_file_name.".pdf", 'path' => $PDF_file_path, 'size' => 0);
				$path_root = \GCore\C::get('GCORE_FRONT_PATH');
				$form->files[trim($config->get('pdf_post_name', ''))]['link'] = str_replace(array(\GCore\C::get('GCORE_FRONT_PATH'), DS), array($site_link, "/"), $upload_path.$PDF_file_name.".pdf");
				$form->data[trim($config->get('pdf_post_name', ''))] = $PDF_file_name.".pdf";
				$form->debug[$action_id][self::$title][] = $PDF_file_path.' has been saved correctly.';
			}
Replace each of the three instances of GCORE_FRONT_ with GCORE_ROOT_ and replace array($site_link, "/") with array($site_link.'/', "/") like this
			//Try to generate an auto file link
			$site_link = \GCore\C::get('GCORE_ROOT_URL');
			if(substr($site_link, -1) == "/"){
				$site_link = substr_replace($site_link, '', -1);
			}
			if ( strlen(trim($config->get('pdf_post_name', ''))) > 0 ) {
				$form->files[trim($config->get('pdf_post_name', ''))] = array('name' => $PDF_file_name.".pdf", 'path' => $PDF_file_path, 'size' => 0);
				$path_root = \GCore\C::get('GCORE_ROOT_PATH');
				$form->files[trim($config->get('pdf_post_name', ''))]['link'] = str_replace(array(\GCore\C::get('GCORE_ROOT_PATH'), DS), array($site_link.'/', "/"), $upload_path.$PDF_file_name.".pdf");
				$form->data[trim($config->get('pdf_post_name', ''))] = $PDF_file_name.".pdf";
				$form->debug[$action_id][self::$title][] = $PDF_file_path.' has been saved correctly.';
			}


[[>>later : fixed missing / see post below <<]]
giusebos 29 Apr, 2016
in the link created missing a slash
after the domain name

http://www.mysite.comcomponents/com_chronoforms5/chronoforms/pdfs/questionario_pdf/pdf_file_20160429170024.pdf
GreyHead 29 Apr, 2016
Hi giusebos,

Thank you, I missed that, I've fixed my post and updated the files again.

Bob
giusebos 29 Apr, 2016
Good work, thanks Bob
I would like to make a guide, the tcpdf files will be available for download from this site?
GreyHead 30 Apr, 2016
Hi giusebos,

Yes I expect so, but I don't have any FTP access to upload them. Max can do that when he is back again.

Bob
Zizou27 10 May, 2016
Hi Bob :
I have the same problem ;
Can you send me the fixed version ?
Thank you
GreyHead 10 May, 2016
Hi Zizou27,

I have sent you a PM.

Bob
nyesteb 13 May, 2016
Hi Bob!

I have a similar problem. Can you send me the fixed version? Thanks!
Balazs
GreyHead 13 May, 2016
Hi Balazs,

I sent you a PM

Bob
MuenMar 28 May, 2016
Hi Bob,

I have the same problem

Can you please send me the fixed version?

THX

Markus
GreyHead 29 May, 2016
Hi MuenMar,

PM sent

Bob
Anasthasi! 10 Jun, 2016
Hi Bob,

I have the same Problem (TCPDF Actions show an empty window when I'm trying to edit them.).
Would you please send me the fixed version?

Holger
Anasthasi! 10 Jun, 2016
Thanks a lot, Bob!
It seems to work.

Now I have to find out how to get a pdf file that contains not only data from the current form bur from other forms that the user filled in befor as well...
GreyHead 10 Jun, 2016
Hi Holger,

You can read the data using a DB Read action (or actions) and process it into the format you need in a Custom Code action for inclusion in the PDF.

Bob
brewerhawaii 30 Aug, 2016
I am trying to get my Joomla/Chronoform to HTTP to my URL, I cant seem to find out how to do this....im no expert coder but typically this has been fairly easy...can somebody explain to me how to do this?

https://1file.debtpaypro.com/post/77e922ae78a48319ceeab076e71ead89acf16f91/
GreyHead 30 Aug, 2016
Hi brewerhawaii,

I don't think this has anything to do with TCPDF?

When do you actually want to make the connection to this site? Do you want to submit the form there (in which case CF can't do any processing)? Or do you want to send the user there do do something? Or just send some data after the form submits?

Bob
brewerhawaii 31 Aug, 2016
I just want to send data from Joomla/Chronoform form to my CRM via HTTP POST
brewerhawaii 31 Aug, 2016
I just want to send data from Joomla/Chronoform form to my CRM via HTTP POST
brewerhawaii 31 Aug, 2016
http://www.1file.org ( form location) to
(POST URL:) https://1file.debtpaypro.com/post/64be17840d3898c9339de15477ea1b73f08fea49/
This topic is locked and no more replies can be posted.