Page MenuHomePhabricator

[regression-wmf.7] Impact module - graphs not displayed correctly
Closed, DuplicatePublic

Description

These three issue might be unrelated or

  • This issue is not reproducible - saw it only once on testwiki wmf.7: the content of the Impact module is not displayed (blank space).

Screen Shot 2023-11-29 at 4.33.02 PM.png (1×2 px, 163 KB)

The Console shows

TypeError: Cannot convert undefined or null to object
  at Function.assign (<anonymous>)
  at useUserImpact.js:67:18
  at Array.map (<anonymous>)
  at quantizeViews

Failed fetching {requesturl}: {error} for testwiki.

  • "Views on articles you've edited" graph is not smooth. However, I could see it only on testwiki or via Special:Impact page since my test users don't have edits on real wikis:
testwiki wmf.7hewiki wmf.7ruwiki wmf.5 correct display
Screen Shot 2023-11-29 at 4.58.31 PM.png (1×750 px, 152 KB)
Screen Shot 2023-11-29 at 5.02.22 PM.png (1×3 px, 317 KB)
Screen Shot 2023-11-29 at 5.01.55 PM.png (1×3 px, 288 KB)

Event Timeline

Probably a fall out from T351898. The horizontal bumps on the daily article views are happening because the client expected ordered keys for the dailyArticleViews object in the user impact data. Relying on object property order is quite brittle per-se so I've submitted a patch to ensure dates are ordered before display in the chart.

The possible offenders from T351898 could be the array_filter or other array operations performed or the json compression/decompressio. Although clients shouldn't assume json ordered keys, I guess it wouldn't harm to run PHP ksort before the json serialization. What do you think @Urbanecm_WMF

Looking into the TypeError: Cannot convert undefined or null to object error but the steps to reproduce are nondeterministic :/ The guess is for recentEditsWithoutPageviews data object we're not sending the views data array but that should be covered by the array fallback in toPageveiwsArray, see source. Will investigate forward.

The first reported issue may be a duplicate of T352256.

Urbanecm_WMF added subscribers: Ata, Base.

The first reported issue may be a duplicate of T352256.

Indeed, merged. Thanks!

This is not a true duplicate (root causes were different in both cases), but the discussion got centralized at T352349 and both fixes are associated to that task, so ended up merging this one as well.