Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Blank CAMPAIGN_TITLE for campaign_reportback on Mobile App reportbacks #5985

@deezone

Description

@deezone

Transactional email request for campaign_reportback on the Grandparents Gone Wired campaign is sending blank values for the `CAMPAIGN_TITLE. I've confirmed that it appears no other campaign reportbacks have the same issue.

Perhaps related, the Grandparents Gone Wired campaign has two languages:

The English version can be viewed but the English, Global page is empty:

The blank / broken English, Global page is displayed if the campaign path is to the node ID: https://www.dosomething.org/node/5775

There appears to be a bug in the ReportbackController specific to the The Grandparents Gone Wired campaign. The $entrity value sent to dosomething_reportback_mbp_request() (https://github.com/DoSomething/phoenix/blob/dev/lib/modules/dosomething/dosomething_reportback/includes/ReportbackController.php#L130) has a blank value for CAMPAIGN_TITLE in the $params sent in the Message Broker request (https://github.com/DoSomething/phoenix/blob/dev/lib/modules/dosomething/dosomething_reportback/dosomething_reportback.module#L863)

The problem payload sent to Message Broker has a NULL value for CAMPAIGN_TITLE in campaign_reportback email transaction requests.

Log Entry for campaign_reportback for The Grandparents Gone Wired campaign. Note the CAMPAIGN_TITLE\";N; value:

{
    "_id" : ObjectId("568c49db0043a891068a31c9"),
    "email" : "xxx@hotmail.com",
    "activity" : "campaign_reportback",
    "source" : "us",
    "activity_details" : "a:11:{s:8:\"activity\";s:19:\"campaign_reportback\";s:5:\"email\";s:22:\"xxx@hotmail.com\";s:3:\"uid\";s:7:\"3449667\";s:10:\"merge_vars\";a:7:{s:12:\"MEMBER_COUNT\";s:11:\"4.7 million\";s:5:\"FNAME\";s:5:\"Megan\";s:14:\"CAMPAIGN_TITLE\";N;s:11:\"IMPACT_VERB\";N;s:13:\"IMPACT_NUMBER\";s:1:\"2\";s:11:\"IMPACT_NOUN\";N;s:23:\"REPORTBACK_IMAGE_MARKUP\";s:173:\"<img src=\"https://www.dosomething.org/sites/default/files/styles/300x300/public/reportbacks/5775/uid_3449667-nid_5775-0.jpg?itok=KgGjL_hi\" width=\"300\" height=\"300\" alt=\"\" />\";}s:12:\"user_country\";s:2:\"US\";s:14:\"email_template\";s:25:\"mb-campaign-reportback-US\";s:8:\"event_id\";s:4:\"5775\";s:10:\"email_tags\";a:1:{i:0;s:26:\"drupal_campaign_reportback\";}s:17:\"campaign_language\";s:2:\"en\";s:18:\"activity_timestamp\";i:1452034523;s:14:\"application_id\";s:2:\"US\";}",
    "activity_date" : ISODate("2016-01-05T22:55:23Z"),
    "logged_date" : ISODate("2016-01-05T22:55:23.941Z"),
    "__v" : 0
}

The result is an email with the merge_var for CAMPAIGN_TITLE not replaced:
image

To Reproduce the Bug:

  • signup for the campaign via SMS mobile: 38383, "Wired" :
  • Start flow: "TECH"
  • Go through steps, "1", "2", "3", "4"
  • report back: "EMOJI"
    • "Y" to confirm submitting images
  • Send image
  • Answer 3 report back questions
  • Produces report back email with empty campaign title (details / example above).

The report back transactional email is triggered when the Drupal API reportback endpoint (https://github.com/DoSomething/phoenix/wiki/API#campaign-reportback) is called.

cc: @marahmi @namimody

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions