Page MenuHomePhabricator

Homepage - old accounts do not have Mentorship module
Closed, ResolvedPublic

Description

  1. Log in with a user account that does not have Homepage enabled.
  2. On Preferences enable "Newcomer homepage"
  3. Go to Homepage - the Mentorship module will be missing:

Event Timeline

I suspect this is a regression in MW core from rMW788331c48a57: Introduce UserOptionsManager and DefaultOptionsManager, which I suspect broke the trick that we use in our UserSaveOptions hook to look at the old preference value. Instead, I think we're now always getting the new preference value, and since we only do mentor assignment when the old and new value for the homepage preference differ (when it changes from false to true), we never reach the mentor assignment code. I haven't confirmed this experimentally, but from reading the code I'm pretty sure this is what's happening.

I'm going to keep investigating this, because if I'm right, the PrefUpdate schema should be broken too, and this would also be the cause of T234241.

Testing notes: after the issue is fixed, test all three types of variant testing.

Change 599376 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/extensions/GrowthExperiments@master] Use $originalOptions in UserSaveOptions hook

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

Change 599376 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Use $originalOptions in UserSaveOptions hook

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

Checked in betalabs with old and newly created users - Mentorship module is always present (as expected). Added to the list of fixes verified in production.

Etonkovidova claimed this task.

Checked in production - wmf.35 - with new accounts on arwiki and kowiki - the Mentorship is present for new accounts and can be enabled for old accounts.