AnsweredAssumed Answered

SugarPDF, unexpected redirect to the record page

Question asked by Michele Mazzilli on May 31, 2016
Latest reply on Sep 21, 2017 by Krunoslav Djakovic

Hi all,

we have problems with generating PDF with SugarPDF.


Following the instructions here:, we created the file '\custom\modules\myModule\sugarpdf\sugarpdf.document.php', but calling this url:


sometimes (not always), instead of seeing the PDF file, SugarCRM redirects us to the record Page (http://localhost/root/#myModule/daccabf6-ea7c-f50e-73a2-5725cc4b3a9e), passing by this url:



Calling the url with PostMan, the response is:


if (parent.location == window.location) {

window.location = "http:\/\/localhost\/root\/#myModule\/daccabf6-ea7c-f50e-73a2-5725cc4b3a9e";

} else {"index.php?module=myModule&action=sugarpdf&sugarpdf=document&record=daccabf6-ea7c-f50e-73a2-5725cc4b3a9e");



that seems generated by '\include\MVC\SugarApplication.php', because of problems in LoadUser function (the variable $_SESSION['unique_key'] is empty and $this->controller->allowed_actions is undefined).


P.S. : After a QRR (Quick Repair and Rebuild), i always see the PDF correctly.


Any idea about this?


Version: 7.6 Ent



Best Regards