Page MenuHomePhabricator

RevisionSlider fails to load on test.wikipedia.org MainPage diff
Closed, ResolvedPublic2 Estimated Story Points

Description

https://test.wikipedia.org/w/index.php?title=Main_Page&diff=275803&oldid=274915

Displays: ⧼revisionslider-loading-failed⧽

ext.RevisionSlider.init.js?a39b2:57

TypeError: Cannot read property 'trim' of undefined
    at Revision.hasEmptyComment (https://test.wikipedia.org/w/extensions/RevisionSlider/modules/ext.RevisionSlider.Revision.js?19ee8:90:28)
    at RevisionListView.makeCommentLine (https://test.wikipedia.org/w/extensions/RevisionSlider/modules/ext.RevisionSlider.RevisionListView.js?df36e:186:13)
    at RevisionListView.makeTooltip (https://test.wikipedia.org/w/extensions/RevisionSlider/modules/ext.RevisionSlider.RevisionListView.js?df36e:145:11)
    at RevisionListView.render (https://test.wikipedia.org/w/extensions/RevisionSlider/modules/ext.RevisionSlider.RevisionListView.js?df36e:47:20)
    at SliderView.render (https://test.wikipedia.org/w/extensions/RevisionSlider/modules/ext.RevisionSlider.SliderView.js?24bfa:59:55)
    at Object.success (https://test.wikipedia.org/w/extensions/RevisionSlider/modules/ext.RevisionSlider.init.js?a39b2:24:22)
    at fire (https://test.wikipedia.org/w/load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=05zc3z0:3148:30)
    at Object.fireWith [as resolveWith] (https://test.wikipedia.org/w/load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=05zc3z0:3260:7)
    at done (https://test.wikipedia.org/w/load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=05zc3z0:9314:14)
    at XMLHttpRequest.callback (https://test.wikipedia.org/w/load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=05zc3z0:9718:8)

API response can be seen at:
https://test.wikipedia.org/w/api.php?action=query&prop=revisions&format=jsonfm&rvprop=ids%7Ctimestamp%7Cuser%7Ccomment%7Cparsedcomment%7Csize%7Cflags&titles=Main_Page&formatversion=2&rvstartid=275803&continue=&rvlimit=500

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript

comment , parsedComment, user are all undefined for revid = 23793

This revision appears in the API as:

{
    "revid": 23793,
    "parentid": 23702,
    "minor": false,
    "userhidden": true,
    "timestamp": "2007-05-18T15:25:25Z",
    "size": 49,
    "commenthidden": true,
    "suppressed": true
},

A quick fix would be to either allow the comment to be undefined, or ensure it is only ever an empty string in the case the comment is hidden. (The same consideration needs to be made for all fields that can be suppressed / hidden)

A further development would be to show in the revision slider when a comment is hidden in some special way.

Change 299041 had a related patch set uploaded (by Addshore):
Account for suppressed comments and users

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

Addshore triaged this task as High priority.
Addshore moved this task from Proposed to Review on the TCB-Team-Sprint-2016-07-14 board.
Addshore moved this task from Next to Active 🚁 on the User-Addshore board.
Addshore moved this task from Incoming to Revision Slider on the TCB-Team (now WMDE-TechWish) board.
Addshore moved this task from Incoming to Doing on the Revision-Slider board.
Tobi_WMDE_SW set the point value for this task to 2.Jul 15 2016, 7:00 AM

Change 299041 merged by WMDE-leszek:
Account for suppressed comments and users

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

I'll close this ticket once the fix is deployed on test.wikipedia.org