Local images not imported in 7.12.6 #4796

Open
opened 2026-02-20 16:24:05 -05:00 by deekerman · 5 comments
Owner

Originally created by @kunanSA on GitHub (Jul 6, 2022).

Issue

The email template cannot import image files, it can only use images from url

Expected Behavior

Import files from my computer

Actual Behavior

Since the Tinymce update, when wanting to import a local file. It is not possible, and it can only be done through the link

Environment

  • SuiteCRM Version used: 7.12.6
  • Browser name and version: Chrome Version +100 (64-bit)
  • Environment name and version: PHP 7.3 (e.g. MySQL, PHP 7):
  • Operating System and version: Debian 11
Originally created by @kunanSA on GitHub (Jul 6, 2022). #### Issue The email template cannot import image files, it can only use images from url #### Expected Behavior Import files from my computer #### Actual Behavior Since the Tinymce update, when wanting to import a local file. It is not possible, and it can only be done through the link #### Environment * SuiteCRM Version used: 7.12.6 * Browser name and version: Chrome Version +100 (64-bit) * Environment name and version: PHP 7.3 (e.g. MySQL, PHP 7): * Operating System and version: Debian 11
Author
Owner

@samus-aran commented on GitHub (Jul 6, 2022):

Requires additional effort to re-instate local file upload e.g. https://www.tiny.cloud/docs/demo/file-picker/

@samus-aran commented on GitHub (Jul 6, 2022): Requires additional effort to re-instate local file upload e.g. https://www.tiny.cloud/docs/demo/file-picker/
Author
Owner

@SinergiaCRM commented on GitHub (Jul 6, 2022):

Hi @samus-aran,

after updating to version 7.12.6 we have detected this same bug in mozaik. In version 7.12.4 TinyMCE did not offer this option but Mozaik did.

In version 7.12.4 we tried to implement the attach a local image button for tinyMCE but we didn't see how to achieve the same functionality as the attach images icon that appeared in mozaik. Consequently we created this issue: https://github.com/salesagility/SuiteCRM/issues/9586

The differences we saw between the functionality of mozaik and the implementation in tinyMCE were:

  1. Images were uploaded to the server when added from TinyMCE and not when saving the template.
  2. From Mozaik a note was created with the name of the file stored in the public folder.
  3. In tinyMCE we implemented that the note was created but still, the image was not added to the body of the email sent from the campaign.

After that attempt, we thought that the button that appeared in Mozaik was not implemented through TinyMCE, but was added by SuiteCRM, although we were unable to locate how it was done.

If it has to be done through tinyMCE, could you give us some clue as to what we missed or how to implement it?

Thanks

@SinergiaCRM commented on GitHub (Jul 6, 2022): Hi @samus-aran, after updating to version 7.12.6 we have detected this same bug in mozaik. In version 7.12.4 TinyMCE did not offer this option but Mozaik did. In version 7.12.4 we tried to implement the attach a local image button for tinyMCE but we didn't see how to achieve the same functionality as the attach images icon that appeared in mozaik. Consequently we created this issue: https://github.com/salesagility/SuiteCRM/issues/9586 The differences we saw between the functionality of mozaik and the implementation in tinyMCE were: 1. Images were uploaded to the server when added from TinyMCE and not when saving the template. 2. From Mozaik a note was created with the name of the file stored in the public folder. 3. In tinyMCE we implemented that the note was created but still, the image was not added to the body of the email sent from the campaign. After that attempt, we thought that the button that appeared in Mozaik was not implemented through TinyMCE, but was added by SuiteCRM, although we were unable to locate how it was done. If it has to be done through tinyMCE, could you give us some clue as to what we missed or how to implement it? Thanks
Author
Owner

@pgorod commented on GitHub (Jul 7, 2022):

@SinergiaCRM remember that Mozaik is just TinyMCE with some stuff on top.

The relevant code you're looking for might be this one:

https://github.com/salesagility/SuiteCRM/blob/master/modules/AOS_PDF_Templates/templateParser.php#L96-L112

... though you'll have to check, I am not sure

@pgorod commented on GitHub (Jul 7, 2022): @SinergiaCRM remember that Mozaik is just TinyMCE with some stuff on top. The relevant code you're looking for might be this one: https://github.com/salesagility/SuiteCRM/blob/master/modules/AOS_PDF_Templates/templateParser.php#L96-L112 ... though you'll have to check, I am not sure
Author
Owner

@SinergiaCRM commented on GitHub (May 10, 2023):

Thanks @pgorod, although we haven't figured out how to use that code to bring back the behavior from previous versions.

We still have the idea that the button that appeared in Mozaik was not implemented through TinyMCE. For now, we'll wait to see if the SuiteCRM team can bring the functionality back in mozaik and add it to tinyMCE.

@SinergiaCRM commented on GitHub (May 10, 2023): Thanks @pgorod, although we haven't figured out how to use that code to bring back the behavior from previous versions. We still have the idea that the button that appeared in Mozaik was not implemented through TinyMCE. For now, we'll wait to see if the SuiteCRM team can bring the functionality back in mozaik and add it to tinyMCE.
Author
Owner

@pgorod commented on GitHub (May 10, 2023):

Do you have access to an installation with the Mozaik that used to work? Can you see (browser dev tools, network tab) if there is a SuiteCRM request when you press the button to select a file, and tell me exactly what that request is?

@pgorod commented on GitHub (May 10, 2023): Do you have access to an installation with the Mozaik that used to work? Can you see (browser dev tools, network tab) if there is a SuiteCRM request when you press the button to select a file, and tell me exactly what that request is?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4796
No description provided.