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.
#1061 - MMR 2.5.12 Premium: Can not upload template
We installed Mail-Merge-Reports version 2.5.12 Premium with SuiteCRM 7.8.10. Operating system is CentOS 7 with the Bitnami stoftware stack. LibreOffice is the CDE edition from Sugaroutfitters.
Unfortunately, we can't upload any templates. My colleague created a Document Template record. When opening it in Edit mode we can select a template file on the local drive (button "Browse"). However, there is no "Upload" button as we would have expected. When using "Save" button, the document template record is indeed saved, but the file is not added.
The LibreOffice Working Directory parameter is set to "/opt/bitnami/apps/suitecrm/htdocs/document_templates/" and this directory is both existing and available to the webserver user.
Any advice would be highly appreciated - this function is vital for our use of Mail-Merge-Reports.
Regards, Wolf
6 years ago
Further observation: The addon behaves identically (missing Upload button in template record) on Ubuntu 16.04 with regular (no Bitnami) software stack. SuiteCRM version is 7.8.10 as well.
6 years ago
Hi,
We don't quite understand the problem that is happening. You say that there is no upload button in record editing, but there is no upload button in the component. To upload a template, select the template with the Browse button, and then save the record with the Save button. If you want to replace a template, edit the record again, delete the template with the Delete button (next to the link to the uploaded document) and repeat the previous process (Browse button and Save button).
If the problem is, as we have understood it, that after the previous steps the file is finally not saved, it will typically be a permissions problem. You have to check the permissions of the '/document_templates' directory, which is where the files are uploaded by default.
To test it, you can use the 'Available variables list & Generate basic template' process to have a template generated automatically. This process already takes care of creating the record, saving the template and associating it with the new record. In case that process fails, and creates the record without saving the template, you should check the permissions of the directory '/document_templates', so that the user running SugarCRM (the server user) can write to that directory to save the file.
Finally, we don't have a SuiteCRM 7.8.10 installation ready to test it at this time, but we have retested version 2.5.12 of the component with SuiteCRM 7.8.3 and it works fine.
Regards
6 years ago
Dear Izertis team,
I am glad that we finally got in contact.
Directory "document_templates" is located within the SuiteCRM directory structure and owned by the Apache user and group. Originally it had permissions 770, which in my opinion would be perfectly fine for the Apache user. In order to be on the safe side, I changed directory permissions to 777. Unfortunately, it made no changes. After selecting the local template file, I can save the template record. The record saves, but the file still doesn't get uploaded.
Regards, Wolf
6 years ago
Update: I also changed in config_override.php parameter
$sugar_config['DHA_templates_dir'] = 'document_templates/'; to $sugar_config['DHA_templates_dir'] = '/opt/bitnami/apps/suitecrm/htdocs/document_templates/';
It doesn't make a difference. What also irritates me - even in loglevel "Debug", suitecrm.log doesn't show any entry.
6 years ago
Update 2: The SuiteCRM directories and files are located within /opt/bitnami/apps/suitecrm/htdocs/ The document template folder is located at /opt/bitnami/apps/suitecrm/htdocs/document_templates/
6 years ago
I did try as well to change an existing record with an alreayd associated template file:
Unfortunately, it didn't work - I was able to remove the "old" template, but replacing it failed as well.
6 years ago
Hold the press...
I just did a new installation of SuiteCRM 7.8.10 on Ubuntu Server 16.04 LTS (but without the Bitnami stack) and now it seems to work. I am running out of time tonight but will check back on Friday (13/04/2018).
6 years ago
Oh, (not so) well: It still doesn't work. The permission structure of directory document_templates is: drwxrws--- 2 www-data www-data 4096 Apr 11 21:42 document_templates
Comparing with your SuiteCRM 7.8 system, is it what it is supposed to be?
6 years ago
Next update: I have executed your Linux file system permissions tips from the readme file. Unfortunately, no behavioural change - the template files are still not uploaded.
6 years ago
The dir_mode/file_mode changes from the readme file also showed not impact.
6 years ago
The issue also doesn't seem to depend on the client web browser: Failure occurs in Internet Explorer and Firefox on Windows 10 as well as in Firefox on Linux.
6 years ago
Hi there,
Sorry but we are very busy this days... we will review your case asap.
Regards,
Anabel
6 years ago
This case can be closed. Nevertheless, it remains unresolved up to now. We have given up, at least on the SuiteCRM installation based on the Bitnami stack. It seems as if Mail Merge Reports is incompatible and this can not be resolved.
We reinstalled on plain Ubuntu 16.04 LTS with a normal repository-based LAMP stack. Now Mail Merge Reports module seems to work better.
6 years ago
Thanks very much for your feedback.
Regards,
Anabel