Email template problems

Hi all

I am having some problems with email templates pulling all of their data into the popup email form.

The template will load the subject, but not the body of the template.

The popup form also contains 2 body fields, one which exceeds the width of the popup screen.

Does anyone have any suggestions on how to overcome these issues?

Cheers

Tony

Hi ozrebel, welcome.

Please read this post with some tips for asking question here

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/18836-guidelines-to-post-in-these-forums

For your question, I would need at least to know the versions, some preliminary look at the logs and Javascript errors, and a screenshot with also help. Thanks

Hi pgr

Thanks for the reply, and sorry for not providing enough information.

I am running the following versions:

Version 7.11.6

Sugar Version 6.5.25 (Build 344)

on a hosted server.

I have attached a screen shot of the Compose Email window.

I can see nothing in any of the logs which appears to reference this issue.

Upon loading the Compose Email window I see the following error in Firefox Console:

SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 510 of the JSON data

Upon attemting to load the template from the popup I get the following in Firefox Console:

TypeError: tinymce.activeEditor is null
sugar_grp1_jquery.js:1342:9
jQuery 20

​ Hope this all helps.

Cheers

Tony

It doesn’t seem like TinyMCE (the email body editor) is loading correctly.

Is this an upgraded instance, or did you just install 7.11.6 fresh?

Hi pgr

Thanks for the response.

It is an upgraded instance, although the email template body displaying twice was occurring before the upgrade.

I have changed the logs to debug mode, and have seen the following references to email templates:

Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] get_user_array query: SELECT id, first_name, last_name, user_name from users WHERE status='Active' AND portal_only=0  ORDER BY first_name, last_name ASC
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query:SELECT id, first_name, last_name, user_name from users WHERE status='Active' AND portal_only=0  ORDER BY first_name, last_name ASC
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query Execution Time:0.00068092346191406
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] SugarBean[EmailTemplate].load_relationships, Loading relationship (assigned_user_link).
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Limit Query: SELECT  email_templates.id , email_templates.assigned_user_id , email_templates.name , email_templates.type , email_templates.description  , jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner  , 'Users' assigned_user_name_mod, email_templates.date_modified , email_templates.date_entered , email_templates.created_by  FROM email_templates   LEFT JOIN  users jt0 ON email_templates.assigned_user_id=jt0.id AND jt0.deleted=0

 AND jt0.deleted=0 where email_templates.deleted=0 ORDER BY email_templates.date_entered DESC Start: 0 count: 21
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query: SELECT  email_templates.id , email_templates.assigned_user_id , email_templates.name , email_templates.type , email_templates.description  , jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner  , 'Users' assigned_user_name_mod, email_templates.date_modified , email_templates.date_entered , email_templates.created_by  FROM email_templates   LEFT JOIN  users jt0 ON email_templates.assigned_user_id=jt0.id AND jt0.deleted=0

 AND jt0.deleted=0 where email_templates.deleted=0 ORDER BY email_templates.date_entered DESC LIMIT 0,21
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query Execution Time:0.00066900253295898
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::process_record
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query:SELECT id, name FROM saved_search
				  WHERE
					deleted = '0' AND
				  	assigned_user_id = '1' AND
					search_module =  'EmailTemplates'
				  ORDER BY name
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query Execution Time:0.00041294097900391
Fri Jul 12 23:56:48 2019 [28647][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Fri Jul 12 23:56:48 2019 [28647][1][WARN] Trying to get property of non-object: list view data "order by" is not defined
Fri Jul 12 23:56:48 2019 [28647][1][WARN] Trying to get property of non-object: list view data "sort order" is not defined
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query:SELECT id, name FROM saved_search
                  WHERE
                    deleted = '0' AND
                    assigned_user_id = '1' AND
                    search_module =  'EmailTemplates'
                  ORDER BY name
Fri Jul 12 23:56:48 2019 [28647][1][INFO] Query Execution Time:0.00037598609924316
Fri Jul 12 23:56:48 2019 [28647][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Fri Jul 12 23:56:48 2019 [28647][1][WARN] CSS File Dawn/yui.css not found
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: EmailTemplates::after_ui_frame
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Creating new instance of hook class hooks without parameters
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Creating new instance of hook class AssignGroups without parameters
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Creating new instance of hook class SugarPrint_logic_hook with parameters
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: ::after_ui_footer
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Creating new instance of hook class AssignGroups without parameters
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Hook called: ::server_round_trip
Fri Jul 12 23:56:48 2019 [28647][1][DEBUG] Calling MySQLi::disconnect()

Cheers

Tony

This is how mine looks with TinyMCE:

Thanks for the feedback pgr.

Maybe I’m at the place where I need to think about a fresh install?

Yes, if you feel that it would be less work than tracking down this problem…

Thanks pgr

Did a reinstall, and after a bit of mucking around have got the templates to function as expected.

Cheers

Tony

I have the same issue on fresh install SuiteCRM version 7.11.18 as well on upgraded crm

@ozrebel Can you tell me what fix have you done to solve these issue?