salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.44k stars 2.07k forks source link

Fix #9737 - Fix issue with campaigns displaying a blank email template #10288

Open JackBuchanan opened 9 months ago

JackBuchanan commented 9 months ago

Use TinyMCE init function to set template body rather than triggering on page load

Suite7: #9737 Suite8: https://github.com/salesagility/SuiteCRM-Core/issues/413

Description

Currently in the Campaigns module the Email Template body is sometimes populated before the TinyMCE has finish initialising resulting in the Email Template being set to blank. This fix moves the onEmailTemplateChange in WizardMarketing.html from being triggered on page load to being triggered on a post init hook in the TinyMCE config. This allows the TinyMCE to initialise before setting the body contents.

Motivation and Context

Fixes issue with Email Template being set to blank when on the Email Template step in the Campaign wizard.

How To Test This

Create a template and set a template Relaunch the wizard and navigate to the Email Template step See that the template now populates as exp;ected

Types of changes

Final checklist

serhiisamko091184 commented 9 months ago

Hello @JackBuchanan,

thanks for your PR!

Regards, Serhii