1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

PDF Custom detail template fails after update to v3.9

Discussion in 'Community' started by marcelhavlik, Nov 29, 2018.

  1. marcelhavlik

    marcelhavlik Member

    Level: Community
    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>
    ...
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    What was your previous version?
    Did you set Joomla error reporting to max?
     
  3. marcelhavlik

    marcelhavlik Member

    Level: Community
    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.
     
  4. marcelhavlik

    marcelhavlik Member

    Level: Community
    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
     
  5. troester

    troester Well-Known Member Staff Member

    Level: Community
    As @cheesegrits asked in the other thread
    i.e. if you select bootstrap as PDF template?

    Or what do you get with your PDF template selected as details template?
     
  6. marcelhavlik

    marcelhavlik Member

    Level: Community
    Bootstrap template for details view also does not work on this site - only boostrap for list views works without any issues.
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Have you done a full github update, and which PDF are you using (DOMPDF or MPDF)?

    -- hugh
     
  8. marcelhavlik

    marcelhavlik Member

    Level: Community
    I did full github update and both PDF modes are affected :-(


    Sent from my iPhone using Tapatalk
     
  9. marcelhavlik

    marcelhavlik Member

    Level: Community
    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: Dec 2, 2018
  10. troester

    troester Well-Known Member Staff Member

    Level: Community
    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.
     
  11. marcelhavlik

    marcelhavlik Member

    Level: Community
    Can you please try again?


    Sent from my iPhone using Tapatalk
     
  12. marcelhavlik

    marcelhavlik Member

    Level: Community
    friendly bump
     
  13. marcelhavlik

    marcelhavlik Member

    Level: Community
    Supporters, could you please help???
     
  14. marcelhavlik

    marcelhavlik Member

    Level: Community
  15. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Find me on Skype (hugh dot messenger at gmail dot com).

    -- hugh
     

Share This Page