Unable to progress past the 'Templates' page when creating an Email Campaign

Hi all,

I’m attempting to test a very simple email campaign. I’ve created a simple email template and now I’m running through the campaign creation. I’ve moved through the ‘Campaign Header’ and ‘Target List’ parts of the setup and I’m now on the ‘Templates’ phase/page. On this page I understood I could select my template and move on however clicking ‘Next’ seems to do nothing. There appears to be no error or missing fields. Has anyone else had this issue?

Yes!

You’ll find other forum posts and a fix on GitHub.

It would help to know your SuiteCRM version, and your PHP version…

Ah fantastic, that’s reassuring. I’m on 8.2. I only just installed it.

I’ll do some searching on github.

This is the nearest topic i’ve found but it’s an older version and sounds slightly different in symptoms.

Is this the thread you’re referring to?

I’ll see if I can follow the advice this afternoon anyway.

That’s old.

I meant this one:

You say you have 8.2, I will assume that is 8.2.0 (I suggest you upgrade to 8.2.4).

And you still haven’t said your PHP version?

I have 8.2.4 sorry I was trying to reply in the car with a baby demanding attention ha!

I managed to figure out the virtual host configuration setup on the server and stick a phpinfo script into the DocumentRoot. It looks like the version being run on the server is PHP Version 7.4.33.

That look’s quite old. Could that be part of the problem? I’ll have a look at the link you sent.

Looking at that thread I think I may be suffering from a different problem. It looks like they have successfully had a campaign working while I have never had a campaign working. I suspect I’m missing some prerequisite setup to the campaign working but there just isn’t any error displayed to tell me what it is.

I’m going to try following through the prerequisite steps on this page and just check I haven’t missed anything. Will report back.

Okay so several of the prerequisite setup steps were not there. I created a bounce email account and set that up. It seems to have connected successfully. I also setup the cronjob for the schedulers and the other schedulers seemed to be active.

Everything seems to be fine now for the prerequisite steps but unfortunately it looks like I get to the same stage with no progress when I click ‘Next’ on the ‘Templates’ stage of campaign setup.

You need to keep an eye on your logs, that’s where you find the FATALs that pinpoint which bug you’re facing exactly.

It then makes Google searches, and Forums searches, a lot more effective.

Incredible thank you! I think that’s the most useful page anyone has sent me so far!

I think I’ve found the issue. It looks like it’s complaining about a bad timezone when I tail the logs and click the ‘Next’ button (among a bunch of other errors it looks like I need to fix :slight_smile:

Sun Apr  9 21:13:02 2023 [27264][-none-][FATAL] cron.php: running as apache is not allowed in allowed_cron_users in config.php. Exiting.
Sun Apr  9 21:14:01 2023 [27337][-none-][FATAL] cron.php: running as apache is not allowed in allowed_cron_users in config.php. Exiting.
Sun Apr  9 21:15:01 2023 [27425][-none-][FATAL] cron.php: running as apache is not allowed in allowed_cron_users in config.php. Exiting.
Sun Apr  9 21:16:02 2023 [27500][-none-][FATAL] cron.php: running as apache is not allowed in allowed_cron_users in config.php. Exiting.
Sun Apr  9 21:16:43 2023 [20578][1][FATAL] Exception handling in /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Sun Apr  9 21:16:43 2023 [20578][1][FATAL] Exception in Controller: DateTimeZone::__construct(): Unknown or bad timezone ()
Sun Apr  9 21:17:01 2023 [27643][-none-][FATAL] cron.php: running as apache is not allowed in allowed_cron_users in config.php. Exiting.
Sun Apr  9 21:17:07 2023 [23064][1][FATAL] Exception handling in /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Sun Apr  9 21:17:07 2023 [23064][1][FATAL] Exception in Controller: DateTimeZone::__construct(): Unknown or bad timezone ()
Sun Apr  9 21:17:12 2023 [23064][1][FATAL] Exception handling in /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Sun Apr  9 21:17:12 2023 [23064][1][FATAL] Exception in Controller: DateTimeZone::__construct(): Unknown or bad timezone ()
Sun Apr  9 21:17:13 2023 [23064][1][FATAL] Exception handling in /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Sun Apr  9 21:17:13 2023 [23064][1][FATAL] Exception in Controller: DateTimeZone::__construct(): Unknown or bad timezone ()
Sun Apr  9 21:17:15 2023 [23064][1][FATAL] Exception handling in /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Sun Apr  9 21:17:15 2023 [23064][1][FATAL] Exception in Controller: DateTimeZone::__construct(): Unknown or bad timezone ()

It looks like suitecrm is running as root. I’ve found this thread which talks about it in detail.

I was going to simply allow the cron to run it in:

“./legacy/config.php”

However it looks like the important thing is for the cron and suite crm to run under the same user:

I didn’t know I could edit the crontab of a user that does not allow logins, like www-data (with crontab -e -u www-data ). Initially I didn’t even consider that there was a separate cron for each user. So I just edited crontab as root and made cron.php always run as root. And the jobs worked, so I just forgot about it… Not good practice, I understand now. But Linux actually induces ignorant admins to do just that.

I need to investigate further this evening.

I’m glad you enjoyed my blog. :blush:

I also have a page there with everything you need to know about cron jobs. But I made an updated version for the official SuiteCRM docs, so I’ll point you there instead:

1 Like

Ah this is super helpful as well thanks @pgr . I have opted to reinstall onto a new Ubuntu server because the other instance had a few too many fatal errors so starting with a clean sheet.

I’ll see if this is still an issue after that and if so I’ll hopefully have fewer issues to whittle through.

Just for the end in the record one of the chaps that does the unix admin stuff for us just installed version 7 latest version to save time. I’ll come back to this again when we’re a bit further down the road with the business. I marked the logs as the solution simply because I think if I’d resolved all those issues in the logs that would have resulted in emails going out the door.