When selecting a mail template, it’s removing existing attachments.
This is horrible behaviour! I have a template for quotas. I create a quota, click “Send as PDF”- the PDF is in the mail, I select the template and poof gone is my attachment.
Please fix this ASAP. 10.2 didn’t fix this issue btw.
I think it’s due to the files in /modules/Emails/include/ComposeView/EmailsComposeView.js. There some shit there about attachments.
I installed a clean 7.10.2 and a clean 7.8.17. It works perfectly fine in 7.8.17 (the original attachment stays, attachments in the templates are added to the original ones). It cleans all the attachments in 7.10.2 whenever you select a template (both when the template contains an attachment and when it doesn’t).
None of both but it looks more like the file on the left than the file on the right. For example: my files contains lines 516.524 from the file on the left, but it doesn’t contain lines 992/999.
I copied the one on the right. Although it doesn’t break the mail function it doesn’t fix the fact that all attachments are being removed when selecting a template.
As said, an exact copy still removes the attachments. And please keep in mind this is on all the instances of the SuiteCRM 10.2 I installed (production, development and testing) with all three different PHP versions. Therefor I think it’s a bug in 10.2. Can you confirm you have the same issue on a fresh install of 10.2?
@PedroErnst - this commit fixes the delete of the attachment but it causes another problem with attachment
Scenario 1: Not selecting a mailtemplate - attachments gets send.
Scenario 2: Selecting a mailtemplate without attachment in template - attachments gets send.
Scenario 3: Selecting a mailtemplate with attachment in template - the attachment from the mailtemplate gets send. The original attachment doesn’t.
In all scenario’s I can see all the attachments in the composer. So that works. However, in scenario 3 the original attachment doesn’t get send, although it shows in the composer.