Page MenuHomePhabricator

Mentee overview (Vue): When a mentee registered before ~2005 is displayed in mentee overview, the module breaks
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Ensure wgGEMentorDashboardUseVue is true
  2. Find an user that has user_registration=NULL in the user table (this is the case for users that registered before ~2005). User is called User:Mentee in the next steps.
  3. Login as User:Mentor and claim User:Mentee
  4. Run extensions/GrowthExperiments/maintenance/updateMenteeData.php (or wait for the dashboard to update)
  5. Go to Special:MentorDashboard and remove all filters (like in F35410654)

What happens?:

The table in mentee overview table does not appear:

image.png (833×1 px, 45 KB)

An error is logged in the browser console:

load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:403 TypeError: Cannot read properties of null (reading 'human')
    at Proxy.data (<anonymous>:71:142)
    at Proxy.cellProps (<anonymous>:64:778)
    at eval (eval at Fp (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:551:801), <anonymous>:49:165)
    at cr (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:441:509)
    at eval (eval at Fp (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:551:801), <anonymous>:48:126)
    at cr (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:441:509)
    at Proxy.render (eval at Fp (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:551:801), <anonymous>:47:99)
    at Mn (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:423:740)
    at fe.fn (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:463:355)
    at fe.run (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue&skin=vector&version=1af5l:410:74)

What should have happened instead?:

The module shows in full. No error is logged.

Software version (skip for WMF-hosted wikis like Wikipedia):

urbanecm@notebook  ~/unsynced/gerrit/mediawiki/extensions/GrowthExperiments
$ git show -s HEAD
commit 97580164e114ef546d8e762f523267d164351fb3 (HEAD -> review/sergio_gimeno/821271)
Author: Sergio Gimeno <sgimeno@wikimedia.org>
Date:   Mon Aug 8 11:28:11 2022 +0200

    Mentee overview(vue): allow zero as edit count filter value

    Bug: T313263
    Change-Id: Id9ae401fe55fd326958b7c7f6b6c68cca18cd63c
urbanecm@notebook  ~/unsynced/gerrit/mediawiki/extensions/GrowthExperiments
$

Context

user_registration is not guaranteed to be populated (it can be null for users who created their accounts before December 2005). Some of those users are curious about the newcomer tools and enable them, which means they're assigned a mentor (and their mentor can see them in the mentee overview module). In case the mentor removes the editcount filter (or sets the maximum to a sufficiently-high number), this bug will be triggered.

Since T301268 was resolved, the default filters are 1 to 500 edits, which means a manual action is needed to see the module broken.

Fortunately, even with this bug triggered, it is possible to change the filters via the UI.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm_WMF triaged this task as Medium priority.

An important edge case => Medium. Claiming, to use this task as an excuse to read through Mentee overview (Vue)'s code.

Change 821290 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] MenteeOverview.vue: Don't break when mentee.registration is null

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

Change 821290 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MenteeOverview.vue: Don't break when mentee.registration is null

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