by Izertis

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.

Includes a 30 day guarantee
Try it Now

By clicking you consent to be contacted by the developer

#440 - [Caso:3511] Issue with Template File Name which contains spaces

Closed Bug? created by kir 8 years ago

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.

  1. dharma member avatar

    Izertis Provider

    8 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)

    • kir member avatar

      kir

      8 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.

  2. dharma member avatar

    Izertis Provider

    8 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).

  3. kir member avatar

    kir

    8 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

  4. dharma member avatar

    Izertis Provider

    8 years ago

    of course, you can send your questions to soportesigi@izertis.com

  5. kir member avatar

    kir

    8 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?

  6. dharma member avatar

    Izertis Provider

    8 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)

    • kir member avatar

      kir

      8 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.

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
  • "The single biggest downfall of the community edition of SugarCRM or SuiteCRM is the lack of creating a report form a custom module for a single event...." - ian

    Read More Reviews