Page MenuHomePhabricator

CiviCRM Message Templates: "Draft" version being sent instead of "Active"
Closed, ResolvedPublic

Description

Summary:
CiviCRM is sending the Draft version of message templates to donors instead of the Active version. This issue was first noticed with the “WMF Thank You (English - United States)” template but may affect all message templates.

Interim solution:
To prevent this from continuing, I've abandoned drafts from templates:

  • WMF Thank You (English - United States)
  • WMF Monthly convert (English - United States)

Expected Behavior
CiviCRM should be sending the Active and not the Draft version of a message template,

Examples:
Under the "Recent thank yous" view, activities with ID:

  • 242631076
  • 242630877
  • 242630507

are examples of donors receiving the Draft version.

After discarding the drafts, it appears that starting from ID 242631189 onward, donors have been receiving the correct Active version of the message template.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I can reproduce this in development, and am trying to figure out where this behavior started. Unfortunately I've gotten all the way back to commit 666759ad72ced9d9faef11a6e9cf9fce43face55 from last April and it's still sending the draft version.

Back to 5f31fb9d193708e8d0dc8ca7f602531fee0475ff from September 2023 and still seeing the bug :S

@Ejegg originally no one actually used the draft feature so it probably worked by virtue of there being no drafts...

Hi team! Wondering about the status on this one? Thanks!

Change #1148910 had a related patch set uploaded (by Damilare Adedoyin; author: Ejegg):

[wikimedia/fundraising/crm@master] Select active translation in API4 wrapper, not draft

https://gerrit.wikimedia.org/r/1148910

Change #1148910 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Select active translation in API4 wrapper, not draft

https://gerrit.wikimedia.org/r/1148910

Hi team! Wondering about the status on this one? Thanks!

Hi @ppenloglou , we've just deployed a fix for this to production. I'd like to find some time to validate it by turning the TY mailer off for a bit, creating a TY draft, then sending a single mail to confirm that it doesn't send the draft version.

Hey @Ejegg , thank you for the update! Okay we'll sit tight and make sure the fix is good to go before we continue working on Civi mailings. Appreciate your hard work 🛠️

@ppenloglou I've just run that test and verified that it sends the active and not the draft email. We should be good to use drafts from now on.

Ejegg claimed this task.