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 <<]]