I have created a custom message type category (i.e. bundle-entity for message type) and added few fields on it.
Then I created message types for this new category - everything fine so far.
But then I tried to created a message of said category and type and got an exception:

MessageException: Field field_severity_level is not a message-text. in MessageType->getText() (line 156 of ...\sites\all\modules\message\includes\message.message_type.inc).

I looked into the code and it looks like on message save every text field of it's message type is tokenized, and while this works for the default field of the default category ('message_text') when a custom text field is encountered the exception is thrown when check is not passed:

if (empty($field['settings']['message_text'])) {
  throw new MessageException(format_string('Field %field is not a message-text.', $params));
}

Probably needs to be turned into empty return statement instead?

Comments

Anthony Cerbic’s picture

Issue summary: View changes

< code > -> < ?php ? >

bluegeek9’s picture

Status: Active » Closed (outdated)