Page MenuHomePhabricator

[wmf.6-regression] SE module - "No more suggestions " card is not displayed
Closed, ResolvedPublic

Description

  1. On a wiki with Growth Experiments features, go to Special:Homepage.
  2. In SE module click on the right (on RTL wikis, it'd be the left arrow) arrow to get to the last suggested article (you may limit the number of suggested article by combining difficulty level filters and topic filters, for example, on cswiki, select Mathematics and Copyedit filters - only 10 articles would be returned.)

When there will be no more articles to display, the arrow becomes unresponsive (not-clickable) and the Console displays the following error:

Uncaught TypeError: Cannot read property 'token' of undefined
    at NewcomerTaskLogger.log (<anonymous>:378:502)
    at SuggestedEditsModule.logCardData (<anonymous>:337:262)
    at SuggestedEditsModule.showCard (<anonymous>:338:46)
    at SuggestedEditsModule.onNextCard (<anonymous>:336:283)
    at SuggestedEditsPreviousNextWidget.OO.EventEmitter.emit (<anonymous>:446:652)
    at SuggestedEditsPreviousNextWidget.OO.ui.mixin.ButtonElement.onClick (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=vector&version=z2h30:187)
    at HTMLAnchorElement.dispatch (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=vector&version=z2h30:70)
    at HTMLAnchorElement.elemData.handle

Note:

  • Another scenario to produce the above error - when there is 0 suggestions (e.g. hewiki, filters: "Politics and government" and "Add links between articles". )
  • the Console on FF gives more details on the error
Uncaught TypeError: task is undefined
jQuery 6
    <anonymous> self-hosted:1173
    jQuery 18
    runScript https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:12
    cssHandle https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    flushCssBuffer https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:4
    flushCssBuffer self-hosted:1220
    (Async: FrameRequestCallback)
    addEmbeddedCSS https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:5
    execute https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    doPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:6
    (Async: requestIdleCallback handler)
    requestIdleCallback self-hosted:1173
    requestPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    setAndPropagate https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    markModuleReady https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:12
    runScript https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    cssHandle https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    flushCssBuffer https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:4
    flushCssBuffer self-hosted:1220
    (Async: FrameRequestCallback)
    addEmbeddedCSS https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:5
    execute https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    doPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:6
    (Async: requestIdleCallback handler)
    requestIdleCallback self-hosted:1173
    requestPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    setAndPropagate https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    markModuleReady https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:12
    runScript https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    cssHandle https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    flushCssBuffer https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:4
    flushCssBuffer self-hosted:1220
    (Async: FrameRequestCallback)
    addEmbeddedCSS https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:5
    execute https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    doPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:6
    (Async: requestIdleCallback handler)
    requestIdleCallback self-hosted:1173
    requestPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    setAndPropagate https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    markModuleReady https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:12
    runScript https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    cssHandle https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    flushCssBuffer https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:4
    flushCssBuffer self-hosted:1220
    (Async: FrameRequestCallback)
    addEmbeddedCSS https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:5
    execute https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:13
    doPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:6
    (Async: requestIdleCallback handler)
    requestIdleCallback self-hosted:1173
    requestPropagation https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    setAndPropagate https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:7
    implement https://he.wikipedia.org/w/load.php?lang=he&modules=startup&only=scripts&raw=1&skin=vector:19
    <anonymous> jQuery

Event Timeline

Etonkovidova renamed this task from [wmf.6-regression] Cannot read property 'token' of undefined to [wmf.6-regression] SE module - "No suggestion found " card is not displayed.May 24 2021, 10:10 PM
Etonkovidova updated the task description. (Show Details)

Hmm, I suspect this has been broken for a while. It looks like we increment queue position when the next button is checked, but we don't compare to see what the total queue size is. So this.queuePosition gets incremented as many times as the arrow is pressed, which means this.taskQueue[ this.queuePosition ] returns undefined instead of a task. IIRC we had a guard against this by disabling previous/next when you're on the last card, but we should probably add a check for total queue length.

image.png (1×2 px, 1 MB)

Indeed I see this stretching back 90 days (https://logstash.wikimedia.org/goto/c80be38e80b5dd0b3411cf0d9c983163) but it seems to have spiked in the last week.

Question is, is it spiking because of a bug in the logging code or because the no suggestion event got a lot more frequent suddenly? (I have no idea how that could happen, though.)

Tgr renamed this task from [wmf.6-regression] SE module - "No suggestion found " card is not displayed to [wmf.6-regression] SE module - "Skip all" dialog is not displayed.May 28 2021, 2:58 PM
Tgr renamed this task from [wmf.6-regression] SE module - "Skip all" dialog is not displayed to [wmf.6-regression] SE module - "No suggestion found " card is not displayed.Jun 1 2021, 12:29 PM
Tgr renamed this task from [wmf.6-regression] SE module - "No suggestion found " card is not displayed to [wmf.6-regression] SE module - "No more suggestions " card is not displayed.

Re-checked on wmf.7 and wmf.9 - there is another manifestation of the issue: if the number of tasks is zero, the selected filters will not be presented to users and the SE module arrows for previously selected filters with >0 number of result, become non-clickable.

  1. On hewiki wmf.9 go to Special:NewcomerTasksInfo - the links this +architecture filters will result in zero results fetched.
  2. On Special:Homepage select 'Add links between articles' and 'Architecture' - the checkboxes can be checked and the counter correctly shows that 0 results are found.
  3. Click on 'Done'
  4. the SE module won't show the selected filters
  5. the previously selected filter set will be displayed, but clicking on the arrows is disabled
  6. the Console errors (see the task description) are displayed
  7. only reloading the page will display the card "No suggestions found"

The bug seems more severe since it disrupts overall users' workflow.

kostajh raised the priority of this task from Medium to High.Jun 10 2021, 9:54 PM

Change 699737 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] selenium: Add test for previous/next nav on Suggested Edits

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

Change 699742 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] SuggestedEdits: Only log task impression for EditCardWidget

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

Change 699737 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] selenium: Add test for previous/next nav on Suggested Edits

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

Change 699742 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] SuggestedEdits: Only log task impression for EditCardWidget

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

Change 701424 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.11] SuggestedEdits: Only log task impression for EditCardWidget

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

Change 701424 merged by Urbanecm:

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.11] SuggestedEdits: Only log task impression for EditCardWidget

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

Mentioned in SAL (#wikimedia-operations) [2021-06-25T20:21:12Z] <urbanecm@deploy1002> Synchronized php-1.37.0-wmf.11/extensions/GrowthExperiments/modules/homepage/suggestededits/ext.growthExperiments.Homepage.SuggestedEdits.js: eaec745e4504527d23ddca32eb7fcd531d5553f9: SuggestedEdits: Only log task impression for EditCardWidget (T283546; emergency deployment) (duration: 01m 00s)

Checked in wmf.12 - works as expected.