Campaign Wizard is going blank at end of Step-4

I have implemented WAMP Server for development environment. It contains MySQL 5.7 and PHP 5.6.

SuiteCRM 7.7.8/7.7.9

The creation of Campaign using the Wizard is not finishing the step-4 (Marketing) well. When I do click on button Next after entering all the required details, it simply presents the BLANK page instead of last step-5.

I have observed some github issues which talk of campaign module having some issues with MySQL 5.7

Can someone offer the solution of above problem?

With thanks,

RK

MySql 5.7 will only be supported in the next SuiteCRM version, 7.8.

The workaround is to go to phpMyAdmin, Variables tab, go to sql_mode variable and remove the value “NO_ZERO_DATE” from the list.

The more permanent solution is to apply the changes in this PR manually:
https://github.com/salesagility/SuiteCRM/pull/2454/files

this is what will be in version 7.9 to make it compatible.

Dear pgr,

I have attempted both solutions:
Fix implemented in include/database/DBManager.php
Removed the variable NO_ZERO_DATE in sql mode

Restarted WAMP again.

Then run ‘Quick Repair and Rebuild’ also.

Nothing has worked so far.

Some more advice is solicited.

With thanks,

RK

Well then you must have a different problem… did you try

  • resetting your permissions
  • checking the logs, both suitecrm.log and php_errors.log
  • clearing your campaigns table in the database - maybe something is only half-started there

Also please tell me which WAMP stack you installed, is it the one from wampserver.com? Or XAMPP?

I’m suspicious of errors like this which are breaking a lot of Windows installs:

Warning: Declaration of AOR_Report::ACLAccess($view, $is_owner, $in_group, $target_module) should be compatible with SugarBean::ACLAccess($view, $is_owner = ‘not_set’, $in_group = ‘not_set’) in C:\xampp\htdocs\SuiteCRM\modules\AOR_Reports\AOR_Report.php on line 1541

These show up on screen (visible to users) on my XAMPP windows testing installation. if that’s what you have, too, I know how to fix it. It might not be showing on screen, but be in the PHP logs.

Dear pgr,

What permissions adjustment you have called to get rid of ‘undefined’ labels etc in your localhost installation? I mean by values in config.php, config_override.php or utils.php .

I have download the following WAMP server from WAMP’s website, not from XAMPP website.
wampserver3.0.6_x64_apache2.4.23_mysql5.7.14_php5.6.25-7.0.10

I have checked the suitecrm.log. There I find the following:

Also my suitecrm log is showing UTC date/time stamp, although I have date.timezone setting to my timezone in php.ini.

Also php error logs also show the UTC time stamp still.

With thanks,

RK

I’m not a good person to help you with permissions values on Windows, normally I’m on Ubuntu, I just installed a Windows VM to be able to test some developments there also. My permissions were fine to begin with, so I didn’t change them. Anyway, I don’t think those values you specify in config.php or utils.php are ever used on Windows.

But you have a FATAL error writing the database, that seems more significant. Suppose you have some broken lines in the database from when your campaigns were failing, maybe if you can clear those up (delete the existing email marketing lines) maybe now (with the MySql fix) they can run correctly?

About the dates, you can have more than one php.ini (one for the web server, one for the CLI).

Did you set up your cron.php scheduler jobs already? That sometimes messes permissions up.

Dear pgr,

Please tell me how to set up timezone correctly in apache, php.ini and mysql or phpmysql, so that all the logs of apache, php, mysql, suitecrm show the log-enteries in my timezone ‘Asia/Kolkata’.

In the meantime, I am removing the faulty row from mysql table ‘Email marketing’ and test.

With thanks,

RK

I don’t know that much about timezones on windows. For now, I would just search the entire disk for more php.ini’s, in case you have more than one.

Open an Administrator command prompt and type

dir \php.ini /s/a

then wait for a long time and it finds more than one, edit the timezone in the others also and restart Apache.

Oh, and there’s also a timezone setting in SuiteCRM itself, on admin->System settings, if I’m not mistaken.

I assume you already changed that one.

I have installed WAMP for development environment. In this environment, it does not make any difference if we make date.timestamp changes in php.ini file. Instead, I need to make this change to file phpForApache.ini which is located in the folder: C:\wamp64\bin\php\php5.6.25

Then I started the WAMP server again. And the log-entries in suitecrm.log started showing my timezone data/time immediately.

Strangely, I didn’t find timezone setting in System Settings or Locale (Admin). I found it, it is not in admin, it is in profile>Advanced

Thanks,

RK

@pgr,

I have got the original problem solved.

Here is the complete solution

STEP-1 : Making changes in MySQL 5.7

Go to your MySQL 5.7 installation, and find the my.ini or my.cnf file. Then search for the ‘sql-mode’ and around lines 65-70 you would find that.

The original settings were:

I made the following changes:

Kindly note that I have removed the mode ‘NO_ZERO_DATE’ in above declaration of sql-mode.

Restart your webserver.

STEP-2 : Making changes in SuiteCRM

Go to folder: include>database>DBManager.php

Add the following code at line: 546


		if($this instanceof MysqliManager && version_compare($this->database->server_info, '5.7', '>=')) {
			foreach ($values as $key => $value) {
				switch ($field_defs[$key]['type']) {
					case 'date':
						if ($value == "'0000-00-00'") {
							$values[$key] = "NULL";
						}
						break;
					case 'datetime':
						if ($value == "'0000-00-00 00:00:00'") {
							$values[$key] = "NULL";
						}
						break;
				}
			}
		}

(Source: https://github.com/salesagility/SuiteCRM/pull/2454/commits/1a09fd2cffde60533c0fd03d1f33cfcc8e1e7105)

Last, do ‘Quick Repair and Rebuild’.

Hope, you would find your ‘Campaign Wizard’ completing all stages smoothly.

With thanks,

RK

It’s great to hear it’s solved.

I wouldn’t expect both changes to be necessary, though… with the change in the code, NO_ZERO_DATE should be allowed to remain in sql_mode.

Otherwise, the new code won’t really fix this issue for everybody… :frowning:

@pgr,

I am not sure!

We can test it, as if these are 2-different solution to one problem or not.

Here’s the link that explains more about 5.7 sql_mode. Two points we can observe there:

  1. The ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE modes were added in MySQL 5.7.8.
  2. Because NO_ZERO_DATE is deprecated, it will be removed in a future MySQL release as a separate mode name and its effect included in the effects of strict SQL mode.

With thanks,

RK

Dear pgr,

Are you ‘pgorod’ at github?

Wow!

Thanks buddy for your help & guidance!

RK

Yep, that’s me, but why the “Wow”?

Am I famous already??? : - )

@pgr,

I am facing a big problem which is asked at forum https://suitecrm.com/forum/developer-help/12591-how-to-create-a-logic-hook-based-on-info-in-subpanels

Could you please leave some instruction there?

I will grateful to you for that.

With thanks,

RK