• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

PDF Custom detail template fails after update to v3.9

Hello, I have just updated one site via Joomla update system to Fabrik 3.9 and cannot generate PDF custom detail templates. Previous version worked like a charn, but now in 3.9 it generates completely blank pages (blank PDF output incl. PDF debug) and filename is pdf.pdf instead of custom file name (configured in /components/com_fabrik/views/details/tmpl/postupovylist_PDF/layouts/form/fabrikfabrik-pdf-title.php). Fabrik debug mode also does not generate any information. Switch to integrated template (protostar) and update to latest github version did not resolve the issue - still blank page.

My template is located in folder /components/com_fabrik/views/details/tmpl/name_PDF/default.php

example of my custom template:
PHP:
<html>
<head>
<style>

* {
    font-family:'dejavu sans'!important;
}

tr.border_bottom td {
  border-bottom:1pt solid black;
}

</style>
</head>
<body>

<table class="tg" style="border-image: initial; width: 100%; border: 2px solid #000000; page-break-after: always; border-collapse: collapse;" border="0">
<tbody>
<tr style="border-image: initial; border: 2px solid #000000;"><th style="background-color: #e8e8e8; height: 70px; text-align: center; vertical-align: bottom
" colspan="6"><span style="font-size: 20pt;">FORM NAME<br />{fabrik_vyroba___vyroba_cislo_zakazky}</span></tr>
<tr style="border: 2px solid #000000;">
<td style="background-color: #cccccc; text-align: center;" colspan="6"><strong><span style="font-size: 12pt;"></span></strong></td>
</tr>
<tr>
<td style="background-color: #e8e8e8; text-align: center;" colspan="6"><strong><span style="font-size: 12pt;">LIST OF RECORDS</span></strong></td>
</tr>
<tr style="border-bottom:1px solid black; background-color: #cccccc;">
<td style="text-align: right;" width="5%"><span style="font-size: 12pt;">No.</span></td>
<td style="text-align: left;" width="15%"><span style="font-size: 12pt;">Size</td>
<td style="text-align: right;" width="5%"><span style="font-size: 12pt;">Count</span></td>
<td style="text-align: right;" width="15%"><span style="font-size: 12pt;">Weight</td>
<td style="text-align: right;" width="45%"><span style="font-size: 12pt;">Design</td>
<td style="text-align: left;" width="15%"><span style="font-size: 12pt;">Area</td>
</tr>

<?php
foreach ($this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_pozice'] as $key => $nazev) { ?>
<tr class="border_bottom">
<td style="text-align: right;"><span style="font-size: 12pt;"><?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_pozice'][$key]?>&nbsp;</span></td>
<td style="text-align: left;"><span style="font-size: 12pt;">&nbsp;<?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_rost_sirka'][$key] . "x" . $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_rost_vyska'][$key]?></span></td>  
<td style="text-align: right;"><span style="font-size: 12pt;"><?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_pocet'][$key]?></td>
<td style="text-align: right;"><span style="font-size: 12pt;"><?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_rost_vaha'][$key]?> kg</td>
<td style="text-align: right;"><span style="font-size: 10pt;"><?php echo strstr($this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_nosnypas'][$key], '(', true) . "; " . $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_oko_sirka'][$key] . "x" . $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_oko_vyska'][$key] . "; " . strstr($this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_vyplnovypas'][$key], '(', true) . "; "?>
</span></td>
<td style="text-align: left;"><span style="font-size: 12pt;">&nbsp;<?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_provedeni'][$key]?></span></td>
</tr>
...
 
Previous working version was Joomla 3.9 + Fabrik 3.8.x (last version from github in summer 2018) and Joomla reporting is set to highest - in development.
 
Any other suggestion? It is really very important for me. I would like to pay for a subscription, but this is not available right now. Please HELP! Thank you
 
Any other idea what could cause this issue? Could you please check my site? I cannot update my site information, but URL and username is correct - password is set to "MW2018"

Example link to test PDF output: index.php?option=com_fabrik&view=form&Itemid=225&formid=8&rowid=180&listid=8
 
Last edited:
After logging in sucessfully your link gives "you are not allowed..."

BTW: I always add a Joomla access level "nobody" assigned to no J! group and assign this to "Empty records" in list access settings.
 
Have you ever found what was the cause of this issue? I am facing a similar issue where PDF files generated blank. This happens with any PDF template and it looks like the thing never reach at the PDF template at all...
However it only happens on the initial submission, as re-saving the form the PDF will be generated.
It also only happens on the online server. In my localhost PDFs are generated with the first submission.
 
Where are you using the PDF button? In form or in details view?
In form view a PDF is showing the content in the state of form load (which is empty on a new record).
 
@troester : I am attaching to an email, a PDF with the submission's data.

The problem is that on New form submission the
Code:
$controller->display();
in the pdfAttachment method of the email plugin returns an empty string.

This work well on my localhost though.
 
Ok, you didn't mention you are attaching.
Do you have different add/edit/view access?
Did you set "Allow PDF Localhost" in Fabrik Options/Lists?
Are both servers running the same Fabrik version (3.9, GitHub?)?
 
@troester ... sorry I missed to mention that...

Ok - it seems it is related to the ACL - as when I am logged in it returns the content of the details view as PDF.

I just set the view records access to public - and the PDF is generated when submitting as guest/public.

So this seems to need to have the Allow PDF Localhost enabled (which already is) and also need to set the Local IP to something... but I have added the local Server IP there, also tried with the Public ones but still it doesn't work.
In the live website which is on the same server (but still in Joomla 3.8.11 and Fabrik 3.8) it works with no issues.

Any ideas? Actually what IP I need to enter in the Local IP setting of the Allow PDF Localhost thing? And any ideas where this is happening in the code to go and investigate it?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top