Campaign Launch Wizard Throws Error After Upgrade to 7.6

After the upgrade from 7.5.3 to 7.6 I canā€™t use email campaigns anymore. When I open the launch wizard for any campaign I only get an empty page. The sugar log shows the following error:


Sat Apr 30 03:05:58 2016 [4282][1][FATAL]  Query Failed:  SELECT  outbound_email.*  , jt0.user_name modified_by_name , jt0.created_by modified_by_name_owner  , 'Users' modified_by_name_mod , jt1.user_name created_by_name , jt1.created_by created_by_name_owner  , 'Users' created_by_name_mod , jt2.user_name assigned_user_name , jt2.created_by assigned_user_name_owner  , 'Users' assigned_user_name_mod FROM outbound_email   LEFT JOIN  users jt0 ON outbound_email.modified_user_id=jt0.id AND jt0.deleted=0

 AND jt0.deleted=0  LEFT JOIN  users jt1 ON outbound_email.created_by=jt1.id AND jt1.deleted=0

 AND jt1.deleted=0  LEFT JOIN  users jt2 ON outbound_email.assigned_user_id=jt2.id AND jt2.deleted=0

 AND jt2.deleted=0 where outbound_email.deleted=0: MySQL error 1054: Unknown column 'outbound_email.deleted' in 'where clause'
Sat Apr 30 03:05:58 2016 [4282][1][FATAL]  Query Failed:  SELECT  templatesectionline.*  , jt0.user_name modified_by_name , jt0.created_by modified_by_name_owner  , 'Users' modified_by_name_mod , jt1.user_name created_by_name , jt1.created_by created_by_name_owner  , 'Users' created_by_name_mod , jt2.user_name assigned_user_name , jt2.created_by assigned_user_name_owner  , 'Users' assigned_user_name_mod FROM templatesectionline   LEFT JOIN  users jt0 ON templatesectionline.modified_user_id=jt0.id AND jt0.deleted=0

 AND jt0.deleted=0  LEFT JOIN  users jt1 ON templatesectionline.created_by=jt1.id AND jt1.deleted=0

 AND jt1.deleted=0  LEFT JOIN  users jt2 ON templatesectionline.assigned_user_id=jt2.id AND jt2.deleted=0

 AND jt2.deleted=0 where ((grp LIKE '' OR grp IS NULL)) AND templatesectionline.deleted=0 ORDER BY templatesectionline.ord: MySQL error 1146: Table 'cag_sugar_us.templatesectionline' doesn't exist
Sat Apr 30 03:05:58 2016 [4282][1][DEPRECATED] SugarBean.php: preprocess_fields_on_save() is deprecated
Sat Apr 30 03:05:58 2016 [4282][1][FATAL] Error inserting into table: templatesectionline: Query Failed: INSERT INTO templatesectionline (id,name,date_entered,date_modified,modified_user_id,created_by,description,deleted,thumbnail,ord)
                                        VALUES ('569a1997-581e-c907-4ae0-5724673ebd1f','Headline','2016-04-30 08:05:58','2016-04-30 08:05:58','1','1','<p></p><h1>Add your headline here..</h1>',0,'include/javascript/mozaik/tpls/default/thumbs/headline.png',1): MySQL error 1146: Table 'cag_sugar_us.templatesectionline' doesn't exist
Sat Apr 30 03:05:58 2016 [4282][1][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.

PHP: 7.0.6
Apache: 2.4.18 (Ubuntu)
MySQL: 5.7.12-0ubuntu1 - (Ubuntu)

Any help is much appreciated! Thanks.

I found another clue. It seems like my update didnā€™t commit because of this error:

Query Failed: ALTER TABLE email_marketing   add COLUMN outbound_email_id char(36)  
NULL : MySQL error 1292: Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_start' at row 34

I think the easiest way to correct this is by adjusting the query in the update file. Unfortunately I have a hard time finding it. Can anybody tell me where to find the update queries for an upgrade?

Thanks!

I actually just figured it out. I had to adjust the SQL mode for the update to go through.

SET GLOBAL sql_mode = '';

That fixed it.

1 Like

Thank you, I have the same problem.
Where do I have to put this assert?

You put it in the database. This is a setting for your SQL server. You can run this command in phpMyAdmin or any other mySQL client on our server.

SET GLOBAL sql_mode = ā€˜ā€™;

Iā€™m sorry, but I donā€™t think that is good advice: you are removing a LOT of flags from the SQL Modeā€¦ who knows what that will cause?

This problem is related to MySQL 5.7, and is already fixed on github, although it hasnā€™t been merged and released yet.

In my system the SQL Mode is:

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

The only flag you need to remove is NO_ZERO_DATE, you can do it from phpMyAdmin on the ā€œVariablesā€ tab.