Page MenuHomePhabricator

BUG: Catalan donate flow is not retaining language data
Closed, ResolvedPublic

Description

We've received a couple complaints from Catalan donors saying they got their TY in English when they donated through the Catalan Wikipedia. I thought it was simply donor error, but after we heard from about 5 donors, I tested the flow.

I donated through the donate.wikimedia.org/wiki/Special:FundraiserLandingPage?uselang=ca&country=ES page and the flow was mostly in Catalan, but I got to an English TY page and an English TY letter. Civi has my preferred language as "unknown" for this donation (see: https://civicrm.wikimedia.org/civicrm/contact/view?reset=1&cid=10907250).

It would be great if we could fix this ASAP so our list for emails next year is as correct as possible, and so we thank caES donors in the correct language.

Event Timeline

CCogdill_WMF raised the priority of this task from to High.
CCogdill_WMF updated the task description. (Show Details)
CCogdill_WMF added subscribers: CCogdill_WMF, atgo, Pcoombe and 2 others.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 30 2015, 11:34 PM
atgo raised the priority of this task from High to Unbreak Now!.Mar 31 2015, 6:19 PM
atgo lowered the priority of this task from Unbreak Now! to High.Mar 31 2015, 6:23 PM
atgo set Security to None.

Update: tested this in Spanish as well and it does not seem to be a problem
there. This may be isolated to Catalan only.

atgo renamed this task from Catalan donate flow is not retaining language data to BUG: Catalan donate flow is not retaining language data.Mar 31 2015, 8:21 PM
awight claimed this task.Mar 31 2015, 8:57 PM
awight moved this task from Backlog to Doing on the Fundraising Sprint Grandmaster Flash board.

@atgo yes, all the reports we've gotten have been from GC donors.

The problem is in DonationInterface's GlobalCollect module. We're normalizing the language down to what the processor supports (globalcollect_gateway/globalcollect.adapter.php::getAvailableLanguages).

That's fair enough for contacting the gateway, but then we store the normalized language in the contribution_tracking table, so when we restore the workflow at the Thank You page, the language is incorrect cos it's loaded from the database.

Have to set this down for a minute. The offending contribution_tracking update statement is just before the SET_PAYMENT call.

Change 201132 had a related patch set uploaded (by Awight):
Don't overwrite donor language with fallback value

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

awight added a comment.EditedApr 1 2015, 7:30 AM

I think the attached patch will fix this. Please note,

  • This issue affected donors making GlobalCollect transactions, whose preferred language was not in GlobalCollect's list of approved translations, linked above.
  • The correct donor language information is still available in logs for the last month, and I believe the problem began with the Mar 12th deployment. I would be happy to spelunk if this is helpful?
atgo added a comment.Apr 1 2015, 5:12 PM

@awight yes, a little spelunking would be awesome at least to determine the scope. Thanks!

@Jessica @MeganHernandez_WMF looks like these upcoming languages aren't on the GC list:

  • Latvian (lv)
  • Ukrainian (uk)
  • Possibly Slovakian (sk) - GC list says "Slovene"

I think Ukraine is the only larger one, and even it is a list of only 15k past donors in en, ru, and uk.

atgo added a comment.Apr 1 2015, 7:55 PM

We expect to have this resolved before those campaigns :)

Ah okay @atgo, nevermind then!

Change 201132 merged by jenkins-bot:
Don't overwrite donor language with fallback value

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

Change 201382 had a related patch set uploaded (by Awight):
WIP Fix unstaging issue

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

Change 201382 merged by jenkins-bot:
Fix unstaging issue

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

Deployed patches made no difference!

Change 205898 had a related patch set uploaded (by Awight):
Be much more conservative about unstaging

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

Change 205898 merged by jenkins-bot:
Be much more conservative about unstaging

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

awight closed this task as Resolved.Apr 24 2015, 4:50 PM
awight moved this task from Review to Done on the Fundraising Sprint Indigo Girls board.