Page MenuHomePhabricator

Visual editor emits many init events with platform "other"
Closed, ResolvedPublic

Description

The visual editor and the 2017 wikitext editor emit many init events with the platform set to other, which shouldn't happen.

According to @DLynch:

The init platform:other issue is that our tracking code tries to work out the platform via platform: ve.init && ve.init.target && ve.init.target.constructor.static.platformType || 'other',
Unfortunately, almost everywhere that we try to log init from hasn't yet loaded the target. Given that most of these are inside ve.init.mw.DesktopArticleTarget.init.js, I think we could safely just hardcode platform: 'desktop' in those calls. (Look for trackActivateStart in that file.)

Event Timeline

Neil_P._Quinn_WMF renamed this task from Visual editor many init events with platform "other" to Visual editor emits many init events with platform "other".Sep 5 2018, 11:21 PM
Neil_P._Quinn_WMF triaged this task as Normal priority.
Neil_P._Quinn_WMF created this task.
Neil_P._Quinn_WMF updated the task description. (Show Details)
DLynch claimed this task.Sep 5 2018, 11:24 PM

Change 455850 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Pass platform to ve.track directly

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

Change 455850 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Pass platform to ve.track directly

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

Anything for me to check here @DLynch?

@Ryasmeen Sort of. You could paste this into your browser console:

ve.trackSubscribe( 'mwedit.init', function(topic, data) { console.log('init', (data && data.platform) ? data.platform : 'MISSING'); } );

...and then activate VE and make sure that it says "init desktop" rather than "init MISSING".

@Ryasmeen Sort of. You could paste this into your browser console:

ve.trackSubscribe( 'mwedit.init', function(topic, data) { console.log('init', (data && data.platform) ? data.platform : 'MISSING'); } );

...and then activate VE and make sure that it says "init desktop" rather than "init MISSING".

Cool! Verified that by switching to VE from different tabs as well.

Neil_P._Quinn_WMF closed this task as Resolved.Sep 24 2018, 4:53 PM

This has been fixed!

select
    left(timestamp, 8) as day,
    count(*) as events
from log.Edit_17541122
where
    event_editor = "visualeditor" and
    event_platform = "other" and
    timestamp >= "20180911"
group by left(timestamp, 8)

         day  events
0   20180911   11167
1   20180912   10766
2   20180913   10711
3   20180914    9889
4   20180915    7868
5   20180916    8627
6   20180917   10980
7   20180918   11441
8   20180919   10839
9   20180920    7384
10  20180921       5
11  20180922       1
12  20180923       1
13  20180924       6
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptSep 24 2018, 4:53 PM