Report URL is missing the correct scheme/protocol

As the subject said, my reports have links that are missing the correct scheme/protocol from the URL. I am running HTTPS without redirects from HTTP (cuts down on bot activity for now) and the URLs are missing https:// and have http:// instead… My site_url in config.php is correct:


'site_url' => 'https://Fully_Qualified_Domain_Name/PATH',

Any ideas?

Thanks in advance!

Version 7.11.6
Sugar Version 6.5.25 (Build 344)
PHP 7.2.19


                    if ($att['link'] && $links) {
                        $html .= "<a href='" . $sugar_config['site_url'] . "/index.php?module=" . $att['module'] . "&action=DetailView&record=" . $row[$att['alias'] . '_id'] . "'>";
                    }

I replaced "$sugar_config[‘site_url’] " with the hard coded https://FQDN/PATH and it did not change anything, so it must be coming from somewhere else.

I should probably add that this is from the “Download PDF” action from the report menu and not from a scheduled report sent via email.

I think it’s just running this action

https://github.com/salesagility/SuiteCRM/blob/master/modules/AOR_Reports/controller.php#L183

which return a PDF document directly. Your browser should react to this by asking you where to save it, unless it knows how to open PDF’s (through an add-on).

I don’t see the SuiteCRM code using any URL, it just works with what it had before (the page where you are, the detail view). Do you have Apache doing any changes to these web requests?

Maybe if you try it on the live demo you can see if (and how) it works there:

https://demo.suiteondemand.com (user:will, pass: will)

1 Like

You need to change the hardcoded http value in the SetBasePath function of modules/AOS_PDF_Templates/PDF_Lib/mpdf.php as the action_downloadPDF() function makes use of this file as a sort of template