Locale lookup incorrectly assumes user is event target
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned |
Bug Description
EG 3.9
Bug 1091588 introduced the ability to send notification emails in the user's preferred language. To determine the preferred language, the new code takes the action trigger event target and looks up the locale for that ID in actor.usr. This is a problem because the target is not necessarily an actor.usr ID -- for example, for checkout receipts, the target is an action.circulation ID. For most such events, the event will fail with an "error" state and a message like this in the logs:
Can't use an undefined value as a HASH reference at /usr/local/
It's also possible that the target will match an existing user ID, in which case the event won't fail but you're using the wrong user's locale.
Changed in evergreen: | |
milestone: | none → 3.9.1 |
importance: | Undecided → High |
status: | New → Confirmed |
assignee: | nobody → Galen Charlton (gmc) |
tags: | added: actiontrigger |
Changed in evergreen: | |
assignee: | Galen Charlton (gmc) → nobody |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
I don't have a fix for this, but for anyone who needs events to work on 3.9, working branch user/jeffdavis/ lp1986479- workaround should do that by disabling the code that looks up the preferred language. This is definitely not a solution, just a temporary mitigation.