Problem/Bug?

Hello

I’m trying to create a worflow to auto set my meetings to ‘held’ once the date has passed.

The conditions being:

  • Meeting > State > Equals > Planned
  • Meeting > Start date > Smaller then > Date > Today

With the action being: edit records > meeting > value > held

It works if I run it to be exucted on save, but when I set it to be executed on planner I get the following error:

Tue Sep 18 04:50:03 2018 [2356][1][FATAL]  Query Failed: SELECT meetings.id AS id FROM meetings  WHERE meetings.status = 'Planned' AND meetings.date_start < DATE_ADD(meetings., INTERVAL   ) AND NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.aow_workflow_id='50861fec-1b7b-2d77-2a3d-5ba0cc1b550a' AND aow_processed.parent_id=meetings.id AND aow_processed.status = 'Complete' AND aow_processed.deleted = 0) AND meetings.deleted = 0 : MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' INTERVAL   ) AND NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.ao' at line 1

I’m a bit confused why it would work while being saved but not in the planner…

If it’s “on save” it applies to a single record, the one being saved, and it runs from your web server (inside the app, when you click to save).

If it’s “on scheduler” it might apply to all records, and it normally runs from the CLI version of PHP executed from crontab.

So it’s a different environment, and a different SQL query.

Which version of MySQL do you have? And PHP? And SuiteCRM?

Did you set the timezone for CLI PHP?

Check with

php -i | grep timezone

And to know which php.ini file to change, use

php -i | grep timezone

That’s the same code twice?


bitnami@bitnami-nginxstack-dm-6c8d:~$ php -i | grep timezone
Default timezone => America/Los_Angeles
date.timezone => America/Los_Angeles => America/Los_Angeles

Is America / Los Angeles your correct timezone?

My second command was wrong, of course, should be this to find the php.ini:

php -i | grep php.ini

Same problem for me i filed a bug for that:
https://github.com/salesagility/SuiteCRM/issues/6328
The Problem lies here: “DATE_ADD(meetings., INTERVAL )”

1 Like

@gunnicom

I updated the system from 7.10.7 to 7.10.9 recently and there is a problem of not receiving email notification from the workflow module. I checked the log and saw these error messages. I believe the issue is related to what you have reported.

Have you found a workaround so far? By commenting out “$params = [null];” at line 427?

Yes.