Workflow error when updating records

Hello,

I have a workflow setup as per the documentation (email reminder for open cases) however, when saving a record that triggers the workflow we receive the following error:

“Database failure. Please refer to sugarcrm.log for details.”

Upon looking at the logs, I noticed:

10/13/14 20:04:55 [7456][c27c071e-e16e-1aa1-5867-4dbee98cc548][FATAL] Error inserting into table: emails_text: Query Failed: INSERT INTO emails_text (email_id,from_addr,reply_to_addr,to_addrs,cc_addrs,bcc_addrs,description,description_html,deleted)
VALUES (‘c06cbe7e-b03f-e0f0-2bd9-543c929cc35e’,’’,’’,’’,’’,’’,‘Hello,\n \nWe have NOT detected any activity for case: 12065.\nPlease log into Sugar, Gmail, etc. and ensure we promptly respond to the customer to close this ticket.’,‘

Hello,

\r\n

\r\n

We have NOT detected any activity for case:12065.

\r\n

Please log into Sugar, Gmail, etc. and ensure we promptly respond to the customer to close this ticket

’,0): MySQL error 1366: Incorrect string value: ‘\xA0\x0AWe h…’ for column ‘description’ at row 1

Any assistance would be appreciated.

Thanks

Hi there,

It looks like SuiteCRM doesn’t like the formatting/values(’\n \n’)being inserted into the emails_text table. Does the workflow run if the email just has plain text?

Thanks,

Will.

Yes, it does run if I leave the e-mail template blank.

Hi there,

There must be an issue with the email template content. Can you attach a html file with the html code for the email template(click the small HTML button when editing the template)?

Thanks,

Will.

I actually tried checking the option “send text only” therefore, this is no html code. I originally tried with html with the same issues.
Here is the HTML code if I uncheck the option:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<p>Hello,</p>
<p>&nbsp;</p>
<p>We have NOT detected any activity for case:&nbsp;$acase_case_number.</p>
<p>Please log into Sugar, Gmail, etc. and ensure we promptly respond to the customer to close this ticket. If we are waiing for the customer to respond then change the status of the ticket to 'Client Pending' so you don't have to get these annoying e-mails.</p>
<p>&nbsp;</p>
<p>Thx</p>
<p>&nbsp;</p>
</body>
</html>

I had similar issues, i resolved this by removing the transitional statement created from editor, every time i open the pdf template it saves again with the header back inside and starts to break the HTML, i resolve this my simply inserting my template body via mysql

INSERT INTO aos_pdf_templates (id, name, date_entered, date_modified, modified_user_id, created_by, description, blah blah blah

hope this helps

Any ideas?

have you resolved this?

No unfortunately, I had to resort to an ugly hack and remove the characters from the emails when they get sent out.