Page MenuHomePhabricator

"TypeError: data.query is undefined" in ext.RevisionSlider.Api.js
Closed, ResolvedPublic3 Estimated Story Points

Description

Open diff https://en.wikipedia.org/w/index.php?title=Noum%C3%A9a&diff=prev&oldid=831046373 and expand "Browser history interactively". The slider slides infinitely. Chrome console contains an error:

Uncaught TypeError: Cannot read property 'users' of undefined

at Object.<anonymous> (<anonymous>:1:642)
at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=monobook&version=18kdz1s:46)
at Object.fireWith [as resolveWith] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=monobook&version=18kdz1s:47)
at done (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=monobook&version=18kdz1s:126)
at XMLHttpRequest.<anonymous> (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=monobook&version=18kdz1s:129)

Reproduced in Vector too:

Uncaught TypeError: Cannot read property 'users' of undefined

at Object.<anonymous> (load.php?debug=false&lang=en&modules=ext.RevisionSlider.Api%2CDiffPage%2CHelpDialog%2CPointer%2CPointerLine%2CPointerView%2CRevision%2CRevisionList%2CRevisionListView%2CSlider%2CSliderView%2CdialogImages%2Cicons%2Cinit%2Cutil|moment%2Coojs-ui%2Coojs-ui-toolbars&skin=vector&version=0elv6l0:1)
at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=18kdz1s:46)
at Object.fireWith [as resolveWith] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=18kdz1s:47)
at done (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=18kdz1s:126)
at XMLHttpRequest.<anonymous> (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=18kdz1s:129)

Event Timeline

MBH created this task.Jun 21 2018, 11:54 AM
Restricted Application added subscribers: Base, Aklapper. · View Herald TranscriptJun 21 2018, 11:54 AM

Going to https://en.wikipedia.org/w/index.php?title=Noum%C3%A9a&diff=prev&oldid=831046373&debug=true (note debug=true) I get in the browser's Developer tools (see https://www.mediawiki.org/wiki/Help:Locating_broken_scripts to learn how to use them):

TypeError: data.query is undefined ext.RevisionSlider.Api.js:47:20
fetchRevisionData/xhr</userXhr< https://en.wikipedia.org/w/extensions/RevisionSlider/modules/ext.RevisionSlider.Api.js:47:20
fire https://en.wikipedia.org/w/load.php:3317:11
fireWith https://en.wikipedia.org/w/load.php:3447:7
done https://en.wikipedia.org/w/load.php:9272:5
callback/< https://en.wikipedia.org/w/load.php:9514:9
Restricted Application added a project: archived--TCB-Team. · View Herald TranscriptJun 21 2018, 12:02 PM
Aklapper renamed this task from Interactive history browsing doesn't work to "TypeError: data.query is undefined" in ext.RevisionSlider.Api.js.Jun 21 2018, 12:02 PM
Lea_WMDE set the point value for this task to 3.Jun 26 2018, 12:53 PM
Lea_WMDE added a subscriber: Lea_WMDE.

This seems to have to do with gendering users correctly
The storypoints are for handling exception gracefully and investigating the underlying bug

Change 442094 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/RevisionSlider@master] Limit fetchUserGenderData to maximum 50 users

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

Quick investigation: The API query to fetch the users genders exceeds the limit of 50. The fetchUserGenderData function returns an error object instead of the expected data object in this case, which then causes the reported failure.

Vvjjkkii renamed this task from "TypeError: data.query is undefined" in ext.RevisionSlider.Api.js to 9iaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from 9iaaaaaaaa to "TypeError: data.query is undefined" in ext.RevisionSlider.Api.js.Jul 2 2018, 7:53 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot set the point value for this task to 3.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

Change 442094 merged by jenkins-bot:
[mediawiki/extensions/RevisionSlider@master] Limit fetchUserGenderData to maximum 50 users

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

Lea_WMDE closed this task as Resolved.Aug 2 2018, 12:49 PM
Lea_WMDE claimed this task.