• Fabrik4.5.1 for Joomla5.2.4

    Fabrik4.5.1 is out. This update is needed for J!5.2.4

    See Announcements

Problem with creating PDF when site has SSL

Trembowiecki

Active Member
Hi,

First thing first: Joomla 5.2.3, Fabrik 4.5, PHP 8.3.16

I've created few VERY complex sites using Fabrik, but they all so far were run locally, using LAN IPs as an address. However, since web browsers are so strict now that require to confirm every PDF download, I've decided to finally create for them inner urls with SSL certificates.

At first it looked like the process went smooth and everything worked like it should. BUT suddenly I've spotted a huge deal breaker: when using SSL certificate (meaning url starts with https, instead of http), the PDF mechanism stopped seeing custom_css.php and template_css in custom detail templates (but also in Fabrik's bootstrap detail template).

The problem is - when I debug PDF, it looks like the style files are processed, it's only the generated PDF that ignores them. I've switched SSL off and it started working aiagn, but hey, something is very wrong.

Oh, and I have the latest Fabrik library (4.2) installed and use DOMPDF.

Help?...
 
In my site (and also in other test sites), it has always worked correctly with SSL certificates. Where did you enable and disable SSL? In the global settings > Fabrik > debug "verify SSL peers"? Or do you mean on your server?
 
I'm sorry I've been a bit chaotic (it's frustration mainly talking). I enabled SSL for the whole site in Joomla general settings.

When I wrote about debugging, I meant Fabrik PDF debugging. Switching Verify SSL Peers on and off didn't change anything. PDF creator just ignores the above mentioned style files.
 
No problem.
It was only to understand what you had done.
Have you updated the .htaccess file? (maybe you have some rules that block some URLs)
it's definitely a problem with the certificate.
Is it valid for the entire domain? have you also tried from another browser?
Because if, as you say, by deactivating SSL, it works, it means that it is somehow blocked by the certificate
 
I'll explain a little more. It's our local LAN with a domain server. If you want to have other local servers running with SSL, you have to create those SSL certificates on local domain server. which we did. Also, since we are no official CA, all CA certificates have to be installed manually on desktops. And it works - all our intranet sites based on Joomla work like a charm, except this freaking PDF rendering.

To answer you question: I've tried Joomla clean .htaccess, I've tried slightly modified .htaccess (which redirected from old IP to new URL) - it's the same.

Browsers tried: Chrome, Firefox, Edge. I've also checked our certificate in each broser and each shows it's valid. The thing is - default.php for each detail template is read - no problem. It's the only custom_css.php and template_css that are completly ignored. And again - only during generating PDF, because they are included when I enable PDF debugging. It's so strange, that I don't even know where to start investigating. I've suspected that baybe these style files are included with 'http' instead of 'https' protocle... which also has no sense.

The only workaround is to place all CSS definitions inside default.php, which sucks.
 
Last edited:
So if you set to http.
Are PDFs displayed correctly with the custom_css.php file?
I really can't play.
In my site and even testing (both locally and online) it loads them correctly.

You could maybe do a test here:
libraries/fabrik/vendor/vendor/dompdf/dompdf/src/Options.php
line 206:
set from "false" to "true".

In any case I believe it is a local "problem" with your server.
 

Members online

No members online now.
Back
Top