Page MenuHomePhabricator

"Value null is the wrong type for property "action.saveIntent.timing" (integer expected) " appears upon opening the Save dialog in mobile VE
Closed, ResolvedPublic1 Story Points

Description

Edit a page and click on "Save" button.
The following error appears in the console:
Value null is the wrong type for property "action.saveIntent.timing" (integer expected)

Event Timeline

Ryasmeen created this task.Aug 18 2015, 9:57 PM
Ryasmeen raised the priority of this task from to Needs Triage.
Ryasmeen updated the task description. (Show Details)
Ryasmeen added a subscriber: Ryasmeen.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 18 2015, 9:57 PM
Jdforrester-WMF triaged this task as Normal priority.Aug 25 2015, 7:06 PM
Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from To Triage to Epics on the VisualEditor board.

This is because the computeDuration function for saveIntent relies on a 'ready' event already having been fired.

And, of course:
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js: ve.track( 'mwedit.ready' );

Yeah, I probably should actually make the parent task…

And when you move that call to ve.init.mw.Target.prototype.onReady, you discover another instance of same problem:
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js: ve.track( 'mwedit.init', initData );

Krenair claimed this task.Sep 3 2015, 4:48 AM
alex@alex-laptop:~/Development/MediaWiki/extensions/VisualEditor (T109525)$ grep "mwedit\." modules/ve-mw/* -R
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js:		ve.track( 'mwedit.abort', {
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js:		ve.track( 'mwedit.abort', {
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js:			ve.track( 'mwedit.abort', { type: 'switchwithout', mechanism: 'navigate' } );
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js:			ve.track( 'mwedit.abort', { type: 'switchnochange', mechanism: 'navigate' } );
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js:				ve.track( 'mwedit.abort', { type: 'switchwith', mechanism: 'navigate' } );
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js:				ve.track( 'mwedit.ready' );
modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js:		ve.track( 'mwedit.init', initData );
modules/ve-mw/init/ve.init.mw.trackSubscriber.js:	ve.trackSubscribe( 'mwedit.', function ( topic, data, timeStamp ) {
modules/ve-mw/init/ve.init.mw.TargetEvents.js:		ve.track( 'mwedit.saveIntent' );
modules/ve-mw/init/ve.init.mw.TargetEvents.js:		ve.track( 'mwedit.saveAttempt' );
modules/ve-mw/init/ve.init.mw.TargetEvents.js:		ve.track( 'mwedit.saveSuccess', {
modules/ve-mw/init/ve.init.mw.TargetEvents.js:		ve.track( 'mwedit.saveFailure', data );
alex@alex-laptop:~/Development/MediaWiki/extensions/VisualEditor (T109525)$

Need to figure out how all of this is supposed to really work (should VE log for all targets or just DesktopArticleTarget) and how MobileFrontend is supposed to deal with logging events for one editor but not another. Preferably before the patch for T110272 starts getting run somewhere important and leaves confusing duplicated/missing logs.

Change 242952 had a related patch set uploaded (by Alex Monk):
Hack to stop logging edit events for non-desktop targets

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

Change 242952 merged by jenkins-bot:
Hack to stop logging edit events for non-desktop targets

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