#440 - [Caso:3511] Issue with Template File Name which contains spaces
Hi If i upload a template file like XXX YYY.docx, then when i click on the link with that file to download - name of the downloading file is only YYY.docx Displaying of the filename on the DetailView is OK. Looks like incorrect handling template file's names with spaces.
10 years ago
We have been testing this issue, but we can't reproduce it. Templates with spaces in its name are working well, and the file download is also done with the correct file name. Are you changing the file name from code? (calculated fields)
10 years ago
hi No i don't change name via code. Step to reproduce Create template with Cyrillic characters and spaces. Upload this template file. You will see name of this template on the detailview of template - it displays OK. Then when i click on the link to this file - and i see downloading name of the template is cutted - name goes OK after first space. So issue is not in the name of the generated doc, but in the downloading name of the template file.
10 years ago
Sorry but we're unable to reproduce the error, even in cyrillic or latin characters. We have tested in detailview and listview and both views are downloading the template file with the correct file name (with spaces).
10 years ago
i could attach screenshots but can't see how to do it here. i could email them to you if it is ok
10 years ago
of course, you can send your questions to soportesigi@izertis.com
10 years ago
For me next fix worked: move out basename() function on line 47 in file dowload_template.php, just use $name = $focus->filename; Will it influence to something else in the module?
10 years ago
Ok, we will add this fix on next version if it works well. Maybe you can get a look to this thread https://forum.owncloud.org/viewtopic.php?f=3&t=2185 ... seems that this is exactly your problem. Try to modify [mbstring] settings in php.ini, and let us know if it works with this change.
Finally, remember that Sugar 6.5.16 supportet platforms not include PHP 5.4 (http://support.sugarcrm.com/05_Resources/03_Supported_Platforms/Sugar_6.5.x_Supported_Platforms)
10 years ago
Easiest solution is to use setlocale() function before using basename() function and no need to edit php.ini What was the general idea of using basename() function instead of getting name from $focus->filename ? And thanks, i knew about 5.4.10 PHP but for now it worked well.