Create documents in docx, xlsx (MS Office Word and Excel), odt, ods (LibreOffice and OpenOffice) and pdf format without MS Office or others plugins installed from any module and subpanel using templates.
#3882 - Template downloads twice the size
Hi,
we have updated the CRM, from version SugarCRM 6.5 with PHP 5.6 to SuiteCRM 7.11.15 with PHP 7.3, and when downloading a template file, the file is downloaded with double the size.
We have investigated what can happen and we have seen that the size of the template on the server is correct, and the error occurs in the download process. A curiosity is that this happens with Google Chrome and not with Firefox.
It seems to be related to the following code in the file: modules/DHA_PlantillasDocumentos/download_template.php
while (ob_get_level() && @ob_end_clean()){ readfile($download_location); }
The sentence readfile($download_location); is executed 2 times and after writing break; sentence after readfile ($ download_location);, the template would be downloaded in the correct size.
Would it be correct to include the break ** after **readfile ($ download_location);?
We also have the doubt if it may be due to some value changed in the server parameters after the update. Could it be?
Regards
2 years ago
Hi,
We are sorry, but we have not been able to reproduce the error you mention in the document generation.
We have tested with Suitecrm 7.11.15 / PHP 7.3.23 and also with Suitecrm 7.11.22 / PHP 7.4.24, both in Firefox, Chrome and Edge without errors. The resulting file in the tests is correct both in size and content.
Regards