1

Has anyone experienced problems with running scheduled reminders under civicrm 4.7.16? After upgrading to that version on 8th Feb and running scheduled reminders for the next issue on 11th February, I got the following error message in the scheduled jobs log:

"Finished execution of Send Scheduled Reminders with result: Failure, Error message: Error: Cannot use action tokens unless context defines mailingJobId and mailingActionTarget"

Scheduled reminders had been running fine until then so I have to assume that there was no problem until v 4.7.16 was installed. The action tokens used in the relevant reminder were {contact.first_name}, {membership.type}, {membership.end_date}, a personalised checksum, {domain.address} and {action.optOutUrl}.

I'm not running any civi extensions.

I'm using an up to date version of Wordpress 4.7.2

Any help would be greatly appreciated.

  • Question: What's supposed to happen when someone clicks on {action.optOutUrl}? What actually happened in the past? In my reading of the code for optOutUrl, it requires a job_id and event_queue_id. But those are "Mailing" concepts -- so I don't see how it would have done something sensible for a "Scheduled Reminder". – Tim Otten Feb 17 '17 at 1:16
2

As a quick-fix, remove the {action.optOutUrl} token.

To pursue a more general fix, there should be an issue in JIRA. One needs to determine whether:

  1. The {action.optOutUrl} worked in a meaningful way in previous releases. (In this case, we need to define what that was and figure a patch to restore it.)
  2. Or the {action.optOutUrl} never worked -- and merely became symptomatic in 4.7.16. (In this case, we need to manage the symptom better -- e.g. present a alert to encourage admins to fix their scheduled reminders.)

(If you don't have a JIRA account but can describe the expected behavior, then post a comment here, and I'll try to file it.)

  • 1
    Tim. Thank you for looking at this. I'm not sure I fully understand all what you say but as far as I'm aware, the token {action.optOutUrl} had been working correctly because we have several members who had opted out of bulk emails and their records had been automatically marked as such. Is it that scheduled reminders don't count as bulk emails and don't need this token? If you could take this into JIRA, I would be very appreciative. – peterb Feb 17 '17 at 9:13
  • In my recent experience with trying to use optOutUrl with scheduled reminders, it doesn't work, for the reason Tim moots. It didn't generate errors, they just didn't work, and only after thinking about it did I understand why. I suspect Peter's optouts were coming from other places (e.g. mailouts). Tim - are you suggesting scanning the scheduled reminders for tokens that will cause issues and generating one of those system status notices? That sounds like a good plan, it could be used to catch other out-of-scope tokens as well. – Alan Dixon Feb 17 '17 at 18:00
  • (1) Alan: Yes, I think it would be generally good to warn about invalid/out-of-scope tokens. (2) Peter: Scheduled reminders were originally designed for transactional use (eg "Activity X is coming due") rather than bulk announcements. (3) Peter: The CiviMail opt-out mechanism was built with tracking behavior -- so you cold see reports about opt-outs. (Ex: "Mailing 123 caused lots of people to opt-out; don't do that again!") However, the details of CiviMail opt-out (like mailing_id/queue_id/group_id) don't apply to scheduled reminders. – Tim Otten Feb 20 '17 at 18:56
  • Based on Alan's comments, I filed in JIRA under formulation 2 -- issues.civicrm.org/jira/browse/CRM-20143 – Tim Otten Feb 20 '17 at 19:09
  • Tim. I deleted the action token {action.optOutUrl} as suggested, but there has been no difference in the error message. I am still getting "Finished execution of Send Scheduled Reminders with result: Failure, Error message: Error: Cannot use action tokens unless context defines mailingJobId and mailingActionTarget". I understand that the tokens {domain.name} and {domain.address} are also action tokens. Should I delete those as well? – peterb Feb 21 '17 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.