CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2021-10-02T05:27:54Zhttps://lab.civicrm.org/dev/core/-/issues/348Custom Participant tokens not working in scheduled reminders2021-10-02T05:27:54Zmagnolia61Custom Participant tokens not working in scheduled remindersCustom Participant tokens do not work in scheduled reminders.<BR>
I believe the underlying code exists in CiviCRM but it is not possible to use participant tokens.
Work has been done to get these working in pdf creation though: https://...Custom Participant tokens do not work in scheduled reminders.<BR>
I believe the underlying code exists in CiviCRM but it is not possible to use participant tokens.
Work has been done to get these working in pdf creation though: https://issues.civicrm.org/jira/browse/CRM-16734
20200902 Coming back at this issue. I tested again and these are the results using CiviCRM 5.28.4<br>
Situation is an event registration and scheduled reminders being send based on that.
| Type of token | example | result |
| ------ | ------ | ------ |
| Only core event tokens | event.title | get correctly replaced |
| Custom event tokens | event.custom_123| Expected one Event but found 0 |
| Only core participant tokens | participant.role | No error, but do not get replaced |
| Custom participant tokens | participant.custom_123 | No error, but do not get replaced |5.43.0justinfreeman (Agileware)justinfreeman (Agileware)https://lab.civicrm.org/dev/core/-/issues/365Unwanted mail blast sent by Scheduled Reminders2021-06-10T07:04:39Zmagnolia61Unwanted mail blast sent by Scheduled Reminders**BUG 1:**<br>
I enabled a scheduled reminder which was configured to sent 12 week before the start date of an event.
The start date was a month ago on july 21st.
* Expected behavior: no mail is being sent.
* Actual behaviour: 500 famil...**BUG 1:**<br>
I enabled a scheduled reminder which was configured to sent 12 week before the start date of an event.
The start date was a month ago on july 21st.
* Expected behavior: no mail is being sent.
* Actual behaviour: 500 families got an email with the last details on the event (that already happened).
Over the last few years we have had more incidents like these and it really hurts our reputation, and within our organization it also hurts the reputation of CiviCRM.
The scheduled reminders should be way more clear in configuration and unintentional mail blast should really be prevented by good tests and more solid code.
For this particular issue I would suggest to NOT send a reminder that is configured BEFORE an event, AFTER the event. This could be configured in Civi/ActionSchedule/RecipientBuilder.php although I lack the skills to figure out how.
**BUG 2**<br>
Also what happened is that the reminder was configured for specific participant statuses and it ignored that and sent it anyway to participants with any status. Should be solved but also a test should be introduced for this.
**BUG 3**<br>
The limit to group function seems (sometimes) to be ignored when sending to participants (selected by event type). Should be solved but also a test should be introduced for this.
**CONCLUSION**<BR>
I will further test on clean install, but to me this seems to be critical bugs as they
1) have a reputation impact<br>
2) might impact spam ratings<br>
3) cause a lot of work to follow up (send rectifications, responding to responses by mail)...
....5.39.0https://lab.civicrm.org/dev/core/-/issues/2535Improve scheduled reminder UI for selection of event specific date or time be...2022-10-01T14:07:07ZlarsssandergreenImprove scheduled reminder UI for selection of event specific date or time before eventTo set a scheduled reminder for an event, you can either set it to a specific date or n hours, days, etc before the event. However, the UI to set these two options is confusing. If you set a date and n hours before, the n hours before is...To set a scheduled reminder for an event, you can either set it to a specific date or n hours, days, etc before the event. However, the UI to set these two options is confusing. If you set a date and n hours before, the n hours before is ignored. The user must click the X beside the date to remove it in order to make the second option work, which is non-standard and confusing (I had a staff member save a reminder multiple times who couldn't figure out why the n hours before option was disappearing).
![image](/uploads/860d004144b394d04c3d68bd92287ef6/image.png)
To make this clearer to users, I suggest adding radio buttons in front of the two options and only using the selected option.5.55.0https://lab.civicrm.org/dev/core/-/issues/2541Clarify scheduled reminder options: Event Start Date -> Event Start, etc2021-04-28T04:27:09ZlarsssandergreenClarify scheduled reminder options: Event Start Date -> Event Start, etcSmall detail, but the options to send a scheduled reminder relative to an event are a little confusing.
![image](/uploads/5841527fcac9d04f62ea81190743bf99/image.png)
If you set a reminder for 4 hours before the "Event Start Date", does...Small detail, but the options to send a scheduled reminder relative to an event are a little confusing.
![image](/uploads/5841527fcac9d04f62ea81190743bf99/image.png)
If you set a reminder for 4 hours before the "Event Start Date", does that mean it is sent four hours before the start of the event (this is what happens) or 4 hours before 12:00am on the day of the event start?
I propose removing Date from all of these, so Event Start, Event End, Registration Start, Registration End.
[Pull request.](https://github.com/civicrm/civicrm-core/pull/20070)5.38.0https://lab.civicrm.org/dev/core/-/issues/2558DB crash when copying event scheduled reminders2021-08-18T01:52:59ZufundoDB crash when copying event scheduled remindersOverview
----------------------------------------
I am experiencing a crash when creating a new event from a template that has scheduled reminders, or trying to copy an event which has scheduled reminders.
The DB error suggests it is t...Overview
----------------------------------------
I am experiencing a crash when creating a new event from a template that has scheduled reminders, or trying to copy an event which has scheduled reminders.
The DB error suggests it is trying to put 0s in the effective_start_date / effective_end_date columns when creating the new scheduled reminders, but this is not allowed.
After the crash, the new event has been created but doesn't have the scheduled reminders it should.
Reproduction steps
----------------------------------------
1. **Events -> New Event**.
1. Choose a template with scheduled reminders
1. Click Continue
1. Fatal db error page :(
OR
1. **Events -> Manage Events**
1. Pick an event with scheduled reminders
1. **More -> Copy**
1. Fatal db error page :(
Current behaviour
----------------------------------------
Error from logs is:
```
.../sites/all/modules/civicrm/vendor/pear/db/DB.php(997): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO `civicrm_action_schedule` (`name` , `title` , `recipient` , `enti...")
#3 .../sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "INSERT INTO `civicrm_action_schedule` (`name` , `title` , `recipient` , `enti...")
#4 .../sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "INSERT INTO `civicrm_action_schedule` (`name` , `title` , `recipient` , `enti...", "DB_Error", TRUE)
#5 .../sites/all/modules/civicrm/vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
#6 .../sites/all/modules/civicrm/vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-1, NULL, NULL, "INSERT INTO `civicrm_action_schedule` (`name` , `title` , `recipient` , `enti...", "1292 ** Incorrect datetime value: '0' for column 'effective_start_date' at row 1")
```
After the crash, new/copied event is created but without scheduled reminders.
Expected behaviour
----------------------------------------
No error and new/copied event created with copies of scheduled reminders
Environment information
----------------------------------------
* __CiviCRM:__ 5.35
* __PHP:__ 7.3.17
* __CMS:__ Drupal 7.8
* __Database:__ MySQL 5.7.30
Comments
----------------------------------------
I see effective_start_date and effective_end_date columns were added in 5.34 and I wonder if something around the database schema constraints/defaults wasn't set correctly in the/my upgrade?5.37.0https://lab.civicrm.org/dev/core/-/issues/2562Simplify when scheduled reminders are sent or not sent for events2023-08-07T15:14:25ZlarsssandergreenSimplify when scheduled reminders are sent or not sent for eventsFor event scheduled reminders, you can set emails to be sent on specific days or N hours or days before or after an event (or before or after registration ends or starts). For emails sent on a specific day, this is straightforward. They ...For event scheduled reminders, you can set emails to be sent on specific days or N hours or days before or after an event (or before or after registration ends or starts). For emails sent on a specific day, this is straightforward. They are sent on that day and anyone who registers after that day does not receive the email.
But for emails scheduled N hours or days before or after an event, the behaviour is less clear. My testing indicates contacts registered soon after an event has ended can still receive emails scheduled to go out 24 hours before the event start or 30 hours before the event end (but contacts registered somewhat later won't receive these emails). Similarly, contacts registered a day after an event ends will receive an email scheduled to go out an hour after the event start. I can't find any documentation that tells users what will happen when they schedule these reminders, though there are a few questions on Stack Exchange wondering about what actually does happen (opinions vary, which is a bad sign).
I think the clearest and best option would be to simply send scheduled reminders at the time they are scheduled and not afterwards. For one, this is simple and probably what users assume happens. It's certainly what our users think. Secondly, let's say you have an event with a confirmation email, one scheduled reminder a day before the event and one 2 hours before the event: with the current system a person who registers at the last minute will receive three emails in short order, which doesn't make sense. Thirdly, if a user registers someone in the backend for an event after the event has ended, just to record their attendance, they probably don't want that person to automatically receive emails previously scheduled to go out right after the event start or similar (this could be avoided by using a different status for the post-event registration and the scheduled reminder, but that's a pretty fine point that users won't think about).
In short, I think there are so many potential pitfalls with a system that sends scheduled reminders after the time set on the reminder has passed, especially when none of this behaviour is apparent to users when they set up the reminders. To me, this outweighs the potential convenience of having reminders sent to late registrants, so we should simply not send scheduled reminders whose time has passed.
I haven't dug into the code yet to see how this all works, but I'll do that and submit a PR as long as this is supported.
EDIT: removed aside on timing of scheduled reminders.https://lab.civicrm.org/dev/core/-/issues/3824Possible for historic scheduled reminder to be sent multiple times if cron jo...2022-11-28T08:14:03ZAdam WoodPossible for historic scheduled reminder to be sent multiple times if cron job does not complete properlyWhen the `Send Scheduled Reminders` job runs, the process fails with errors like the following (reported by our Cron Daemon):
```
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 245760 bytes) in /ho...When the `Send Scheduled Reminders` job runs, the process fails with errors like the following (reported by our Cron Daemon):
```
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 245760 bytes) in /home/cses_org_uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Cache/SqlGroup.php on line 184
```
If attempting to invoke the job manually from the scheduled jobs admin page, we get an HTTP 500 error and the following entries in the error_log:
```
[Thu Aug 25 19:51:26.801469 2022] [fcgid:warn] [pid 27274] [client 79.69.229.183:51994] mod_fcgid: read data timeout in 301 seconds, referer: https://cses.org.uk/administrator/?option=com_civicrm&task=civicrm/admin/job&action=view&reset=1&context=joblog&id=9
[Thu Aug 25 19:51:26.819905 2022] [core:error] [pid 27274] [client 79.69.229.183:51994] End of script output before headers: index.php, referer: https://cses.org.uk/administrator/?option=com_civicrm&task=civicrm/admin/job&action=view&reset=1&context=joblog&id=9
```
We can see that the job is starting but never finishing from the log:
![image](/uploads/f30bd5bc2f0df34579eb3fa9247545b9/image.png)
_**The scheduled reminders do seem to be sending successfully, however. Other cron jobs also seem to complete successfully.**_
This issue seemed to start recently with an unplanned, emergency server migration. It's a virtual server so notionally everything is the same, but there may be some other factor at play here (CiviCRM upgrade, change to one of the reminder templates etc). I have double-checked PHP resource limits (256M memory, 300 second timeout i.e. more than enough) and MySQL settings and can't find anything amiss.
The error occurs at the following line in `SQLGroup.php`:
```php
private function reobjectify($value) {
return is_object($value) ? unserialize(serialize($value)) : $value; // This line fails
}
```
It seems as though `serialize()` is failing: whatever value is at fault, it was previously `unserialize()`d successfully to read it out of the cache in the first place. What does this function actually do - why the round trip??
I attempted to debug with some judicious `error_log()` immediately before and after this line to see which cache value was causing the memory leak, but to no avail. No error_log was written before the crash (although many previous successful calls to the function were logged).
This is on CiviCRM 5.50.4. I will attempt an upgrade soon to see if this fixes it, and will continue to investigate / try to narrow down / work out how to reproduce.https://lab.civicrm.org/dev/core/-/issues/3959Event Scheduled Reminder Behavior2022-11-10T07:20:20ZLKuttnerEvent Scheduled Reminder BehaviorI am wondering if this behavior has been changed-- I did not see any online mention of a change with Scheduled Reminders.
Scenario: A schedule event reminder was set for 24 hours before the event start time 4:00 PM Tuesday.
On Monday at...I am wondering if this behavior has been changed-- I did not see any online mention of a change with Scheduled Reminders.
Scenario: A schedule event reminder was set for 24 hours before the event start time 4:00 PM Tuesday.
On Monday at 4:00 PM, 24 Hours before the event, the reminder is successfully sent to registered attendees.
On Tuesday, the day of the event, additional contacts register.
Expected behavior: The scheduled reminder that was sent on the previous day is NOT sent to new registrants.
Experienced behavior: The reminder scheduled for the previous day is sent ten minutes after a new contact registered.
I do not find any explanation for the later sent reminder emails.
This is with CiviCRM 5.45.7 on Drupal 7 with PHP 7.3.29https://lab.civicrm.org/dev/core/-/issues/3987Scheduled reminders can't be used with memberships with autorenewal disabled2022-11-17T07:21:23Zaydunsaidan.saunders@squiffle.ukScheduled reminders can't be used with memberships with autorenewal disabledAs described in https://civicrm.stackexchange.com/q/42905/225 scheduled reminders can't be used for memberships where autorenewal is not offered. Autorenewal has to be optional or required.As described in https://civicrm.stackexchange.com/q/42905/225 scheduled reminders can't be used for memberships where autorenewal is not offered. Autorenewal has to be optional or required.https://lab.civicrm.org/dev/core/-/issues/4100Add setting to disable Smarty in Scheduled reminders2023-04-11T12:40:41ZMichael McAndrewAdd setting to disable Smarty in Scheduled remindersUntil now, Smarty has been turned on in scheduled reminders.
This can cause problems when inline CSS is present in the scheduled reminder (e.g. when the html for the reminder was generated via Mosaico using the https://civicrm.org/exten...Until now, Smarty has been turned on in scheduled reminders.
This can cause problems when inline CSS is present in the scheduled reminder (e.g. when the html for the reminder was generated via Mosaico using the https://civicrm.org/extensions/mosaico-message-templates extension). It causes a fatal error when sending the messages which may not be detected and may cause other scheduled jobs to fail.
We could fix this by turning it off but some sites may want to preserve the current behaviour (those who actually use Smarty in their scheduled reminders - we don't now how many of these exist but we presume that they are in the minority - see https://github.com/civicrm/civicrm-core/pull/15436#issuecomment-541923948 for a discussion of why Smarty was enabled originally).
So we:
1. add a new setting `scheduled_reminder_smarty` which by default is null, i.e. we disable this feature for new sites.
2. enable this feature during the upgrade to preserve the existing behaviour
3. let people know they we might want to turn it off in a post upgrade message
We should also consider mentioning this in the https://civicrm.org/extensions/mosaico-message-templates documentation.
See https://github.com/civicrm/civicrm-core/pull/15436 and https://lab.civicrm.org/dev/core/-/issues/58 for relevant background.5.60.0https://lab.civicrm.org/dev/core/-/issues/4377Don't allow scheduled reminders for events to also include groups2023-09-02T05:11:52ZlarsssandergreenDon't allow scheduled reminders for events to also include groupsEdit: See discussion below, this doesn't actually work anyways.
If a user is able to edit events and has access to a particular group, they can add that group to a scheduled reminder for an event with Also include. It doesn't seem like ...Edit: See discussion below, this doesn't actually work anyways.
If a user is able to edit events and has access to a particular group, they can add that group to a scheduled reminder for an event with Also include. It doesn't seem like a good idea to let users scheduled a reminder to potentially a very large number of contacts via an event scheduled reminder, which is intended to email participants for an event.
I can see the case for also including manually selected contacts, but also including groups seems dangerous and an invitation for mistakes. If a user needs to send a scheduled reminder to a group, they would probably be better off using a mailing or a separate scheduled reminder.
Proposal: Disable the Also include > Select Group option in scheduled reminders for events.https://lab.civicrm.org/dev/core/-/issues/4482Action schedule effective start and end dates ignored when using an absolute ...2023-08-09T13:56:33ZjamieAction schedule effective start and end dates ignored when using an absolute trigger dateHere's an action schedule that did not go as expected:
![image](/uploads/8205f1e5dbba0c9f0b056b72d4f6c261/image.png)
Notice how there is an absolute date as the "When (trigger) date" *that does not allow you to enter a time* and also a...Here's an action schedule that did not go as expected:
![image](/uploads/8205f1e5dbba0c9f0b056b72d4f6c261/image.png)
Notice how there is an absolute date as the "When (trigger) date" *that does not allow you to enter a time* and also an "Effective Start Date" that *does allow you to enter a time.*
In the [code](https://github.com/civicrm/civicrm-core/blob/4e4de633c452fd2e9a36df61bdbdb258b9f88ed7/Civi/ActionSchedule/RecipientBuilder.php#L418) we seem to ignore the effective start and end dates when an absolute date is specified.
So, this email was sent at 12:05 am on August 5th instead of 8:05 am on August 5th.
I get it. If you are specifying an absolute start date, why would you need an effective start date?
Well, in this case it's because you are fine-tuning with a time.
I see three options:
1. Change the UI so that the effective start and end dates are greyed out if you enter an absolute date. This seems like the easiest to implement.
2. Change the code so that we don't ignore the effective start and end date when using an absolute date. I'm not crazy about messing with the Action Schedule code. But, this seems like it could be pulled off without a lot of work or risk.
3. Allow setting an absolute date with a time attached to it (and also doing number two). I would rather have a root canal than be responsible for this one. But, it does seem like the best optionhttps://lab.civicrm.org/dev/core/-/issues/4732Scheduled Reminder select2 fields to save/view correctly2023-10-27T00:41:38Zmagnolia61Scheduled Reminder select2 fields to save/view correctlyI am testing 5.68 (master) and run into a problem with Event Type based scheduled reminders.
I think since the Event Type and Registration status have been changed to select2 values are saved but when I re-edit the reminder the field sh...I am testing 5.68 (master) and run into a problem with Event Type based scheduled reminders.
I think since the Event Type and Registration status have been changed to select2 values are saved but when I re-edit the reminder the field show empty.
![image](/uploads/1b0c39ee96ae06c36c0b8dcf2adc1552/image.png)
This is what is recorded in the database:
![image](/uploads/b9f77048338bd4347da0a6cc96cc94e1/image.png)
When I select a single value the behavior of the participant status is different than for the event types. A single value for the participant status gets saved and shown on re-edit.
![image](/uploads/d0659ed253a2ee37a07f21be2f0d70a8/image.png)
BTW. I confirmed this bug on https://dmaster.demo.civicrm.org/
![image](/uploads/b078da97fc6d141a3a5d7d54cc6c1ec0/image.png)
![image](/uploads/c256cd3bdef9f8980be7ab38fdaeb8ed/image.png)https://lab.civicrm.org/dev/core/-/issues/4875Better tracking of Scheduled Reminders including Reporting2024-02-21T19:56:17ZshaneonabikeBetter tracking of Scheduled Reminders including Reporting## Overview
_It has come up quite a few times with several clients of ours, whereby they want to see what Scheduled messages went out, if they bounced, and other details. In a few cases, the Scheduled Reminders were not configured prope...## Overview
_It has come up quite a few times with several clients of ours, whereby they want to see what Scheduled messages went out, if they bounced, and other details. In a few cases, the Scheduled Reminders were not configured properly by the client, which is understandable but that's another UI issue._
_So I think it could be really helpful to provide this type of tracking, including click-through, FFWD, etc for Scheduled Reminders like regular mailings._
## Example use-case
1. Set up a Scheduled Reminder for an Event or Membership Renewal
2. Go to Reports to view the progress of Scheduled Reminders
3. Filter by click-throughs, bounce, etc.
## Current behaviour
_Same as above. Presently, the only workaround in some cases like Scheduled Reminders is to create a "fake" mailing that is sent out to one person. Then copying the code generated into the Scheduled Reminder allows a person to actually track the Scheduled Reminder information like you would with a regular mailing because it is associated to our "fake" mailing. But this is super not sustainable or even doable for Event Reminders._
## Proposed behaviour
_Basically, I think it could be extremely useful to integrate the same functionality for Mailing tracking (including bounce) to Scheduled Reminders._https://lab.civicrm.org/dev/core/-/issues/5034Schedule Reminders task for Events fail to complete when Event tokens used in...2024-02-28T12:49:12ZmarcusjwilsonSchedule Reminders task for Events fail to complete when Event tokens used in combination with "Also include" ContactsOverview
----------------------------------------
When Scheduled Reminders are set up for an Event in CiviCRM, and the content of that email includes Tokens relating to the Event (Event Title, Start Date, etc.) AND the user includes addi...Overview
----------------------------------------
When Scheduled Reminders are set up for an Event in CiviCRM, and the content of that email includes Tokens relating to the Event (Event Title, Start Date, etc.) AND the user includes additional Contacts to include in the Scheduled Reminder (in the "Also include" field), this breaks the Scheduled Reminder scheduled task, and it fails to complete.
Reproduction steps
----------------------------------------
1. From an event, set up a Scheduled Reminder to send based on the Event, i.e. 24 hours before the Start Date
2. In the body content of the Scheduled Reminder email, include one or more Tokens related to the Event (Event Title, Event Start Date)
3. In the "Limit or Add Recipients" field for the Scheduled Reminder "Also include" a Contact who is NOT registered as a Participant for the given event
Current behaviour
----------------------------------------
When the scenario above is in place, Scheduled Reminder task trigger by the CiviCRM Cron starts to fail and not complete.
Expected behaviour
----------------------------------------
Scheduled Reminder tasks should continue to run, complete and include the additional Contacts in the Reminder email as well as the Event Participants.
Environment information
----------------------------------------
* __CiviCRM:__ 5.64.4
* __PHP:__ _7.4/8.0__
* __CMS:__ _WordPress 6.4.3_
Comments
----------------------------------------
Tested and reproduced on production site and on a clean Civi+WP site using CiviBuild in test CiviCRM site.