notifications / alerts not working suiteCRM

Hi, i’m work with suiteCRM version 7.9.17 but i have problems on notification and alerts, the bell it does not activate to remember the scheduled calls among other things, i checked the log and find this error

PHP Fatal error: Cannot redeclare padNumbers() (previously declared in /home/sysgocom/public_html/tvg_crm/include/SugarFields/Fields/CronSchedule/SugarFieldCronSchedule.php:41) in /home/sysgocom/public_html/tvg_crm/include/SugarFields/Fields/CronSchedule/SugarFieldCronSchedule.php on line 41

but i don´’t now if maybei is this problem.

someone has had the same problem or could they tell me if I forgot to act something :frowning:

Do you have these changes in your code?

https://github.com/salesagility/SuiteCRM/pull/5443/files

they were supposed to fix it…

1 Like

It does not have those changes my code appears like this:

$this->ss->assign(‘weekday_vals’,json_encode($weekdays));
$this->ss->assign(‘weekdays’,get_select_options($weekdays,’’));
$days = $this->getDays();
$this->ss->assign(‘days’,get_select_options($days,’’));
function padNumbers($x){
return str_pad($x,2,‘0’,STR_PAD_LEFT);
}
$minutes = array_map(‘padNumbers’,range(0,59));
$hours = array_map(‘padNumbers’,range(0,23));
$this->ss->assign(‘minutes’,get_select_options($minutes,’’));
$this->ss->assign(‘hours’,get_select_options($hours,’’));

Can you try applying them and tell us if it fixes your problem? Meanwhile I’m trying to figure out why the fix isn’t in your version 7.9.17…

I made the change, but the notification bell still does not work, I have desktop notifications activated.

Ok, but did the error in the logs go away?

And in Admin / Schedulers, the Reminders job, does it show “Last ran successfully” when? Is it recent? Does the time zone look correct to you?

The error disappeared, the modification seems to work,

but i don´t find the option of Reminders job, can you indicate where this it.

In English it’s Admin / Schedulers, as I wrote above. You’ll have to figure it out in Spanish, or log in to your system in English.

I found the option of Schedulers but I do not see the option of Reminders job, change of name in this version?

Run Email Reminders Notifications (even for the reminders that are not via email)

ok, this is the configuration

“Last ran successfully”: is never, time zone it seems right

Check the other jobs. Do they all have “last ran successfully” as never, or as a long time ago? If yes, then your problem is that cron.php is probably not running.

If the only job with problems is this one, then you should look for error messages in the logs (php_errors.log and suitecrm.log)

The “last ran successfully” as never in all,but I already added the cron.php to my cronjobs of my cpanel.
Also check suitecrm.log and error_log and show me this:

-suitecrm.log:
[442466][-none-][FATAL] cron.php: running as is not allowed in allowed_cron_users in config.php. Exiting.

The error does not show me the current username

-error_log

PHP Fatal error: Uncaught exception ‘Exception’ with message ‘cron.php running with user that is not in allowed_cron_users in config.php’ in /home/[user]/public_html/tvg_crm/include/utils.php:1762
Stack trace:
#0 /home/[user]/public_html/tvg_crm/cron.php(65): sugar_die(‘cron.php runnin…’)
#1 {main}
thrown in /home/[user]/public_html/tvg_crm/include/utils.php on line 1762

but already modify the config.php file in allowed_cron_users

This is quite strange, but there is another person right now (on the Spanish forums) with the exact same problem as yours… and it’s also 7.9.17…

Are you on Windows or Linux? Which Linux?

Which version of PHP?

Your own server, or shared hosting?

Thanks

@pgr - am having the same problem with notifications not working . I implemented this code and still no joy.
Is there something else I need to be aware of? (@Mac-Rae - I believe @pgr is no longer with you guys?)

Many thanks

@Grow Still a superb community member and mod however so I’m sure if he finds the time he’ll be happy to help :+1::+1: