Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
COmanage Registry 4.0.0 (Purple Jade)
Description
Message Templates that existed prior to 4.0.0 do not have a format set. When trying to send a Notification, CoPetition throws an error:
Call to a member function to() on string
Error: An Internal Error Has Occurred.
Stack Trace
APP/Model/CoNotification.php line 759 → CoNotification->sendEmail(string, string, string, string, string, string, string, string, string, boolean, string, string, null)
This is because CoMessageTemplate::getMessageTemplateFields() sets $format to $tmpl['format'], regardless of whether or not there is a value there (and overriding the default value set two lines above). $format should only be overwritten if $tmpl['format'] is not empty.
Additionally, there should probably be some code added to UpgradeVersionShell::post400() that populates cm_co_message_templates:format to MessageFormatEnum::Plaintext for all existing message templates.
Attachments
Issue Links
- is related to
-
CO-2082 Message body fields in email template cannot be marked as required by backend
-
- Resolved
-