Page MenuHomePhabricator

Some EditAttemptStep events on existing pages do not have revision IDs
Open, MediumPublic



All EditAttemptStep events that aren't creating a new page (identified by page_id != 0) should have a valid revision_id (the newly saved revision for saveSuccess events, and the base revision for the edit for all the rest).

However, some events don't. This is the count of non-page creating events with a revision ID of 0 during the 90 days ending 4 February 2019.


This appears to be happening across all our editors, but not really affecting saveSuccess events (probably thanks to our recent work on T226847).

The desktop wikitext editor is the most heavily affected. Here's the problematic events as a proportion of all events:


Source notebook.

Event Timeline

A couple of initial notes:

  • This is not blocking any of our planned analysis of VE-as-default or edit cards.
  • I imagine the intention behind logging the ID of the base revision (as opposed to logging the ID of the new revision in saveSuccess events) is to help us pinpoint base revisions that are breaking the editor somehow, but I doubt we've ever actually used it. So maybe we should just stop doing it. @DLynch, @Esanders, any thoughts?

So, null revision_id means that mw.config.get( 'wgRevisionId' ) didn't return anything. This implies bigger issues with the current session...

I just rechecked this, and it's still a problem. I've updated the numbers in the description., I put my code in the notebook which is linked in the description.

I think I just realized what is causing this – when you open the old wikitext edit page, mw.config.get( 'wgRevisionId' ) is not set. When you switch to VE and save the page, you get this effect.

Elsewhere in the code, we use $( 'input[name=parentRevId]' ).val() instead, maybe we should do the same here.

edit: This is a known behavior: T62548

Change 571555 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Fix EditAttemptStep events logged with revision_id=0

Change 571555 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix EditAttemptStep events logged with revision_id=0

matmarex removed a project: Patch-For-Review.

That should fix this. We should check if this is still happening for new events after the change is deployed (after 20 February).

Thanks @matmarex , I have opened T244939 to QA this after Feb 20.

ppelberg claimed this task. found in March that this is still an issue (T244939#5981084).

Change 651234 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/WikiEditor@master] Edit page normally lacks wgRevisionId, but does have wgCurRevisionId

Change 651234 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Edit page normally lacks wgRevisionId, but has form field parentRevId

ppelberg added a subscriber: MNeisler.

Maybe resolved for real this time?

Per today's team meeting, I'm assigning this task over to @MNeisler / Product-Analytics to verify whether resolved this issue or not.

LGoto triaged this task as Medium priority.Jan 19 2021, 6:09 PM
LGoto moved this task from Triage to Current Quarter on the Product-Analytics board.