Page MenuHomePhabricator

Copyright message not shown in save dialog after restoring from auto-save
Closed, ResolvedPublicBUG REPORT

Description

The copyright message in the save dialog is missing in some situations:

image.png (622×1 px, 95 KB)

Steps to reproduce:

  • Go to https://test.wikipedia.org/wiki/POTD
  • Click Edit
  • Make some modification, press save (don't follow through with publishing), you'll see the copyright notice
  • Reload the page
  • Make a modification, press save
  • No copyright notice, but you should see one

Event Timeline

kostajh changed the subtype of this task from "Task" to "Bug Report".Apr 1 2022, 8:04 AM

git bisect says rGVED14fd3ce2d240: Initialize ContentBranchNode CSS classes properly is the commit that caused the issue (cc @dchan)

...which makes no sense. I think I didn't trigger the bug properly with git bisect; it seems to only manifest when suggested edits are involved.

OK, it seems to be because the paction=parse API isn't called (e.g http://localhost:8080/w/api.php?action=visualeditor&format=json&paction=parse&page=Classical_kemen%C3%A7e&uselang=en&formatversion=2&oldid=6652) when the user clicks on Edit, and that's where copyrightMessage gets returned from the server side.

And I've reproduced on an article through normal editing workflow, so I don't think this is GrowthExperiments related.

Steps to reproduce:

  • Go to https://test.wikipedia.org/wiki/POTD
  • Click Edit
  • Make some modification, press save (don't follow through with publishing), you'll see the copyright notice
  • Reload the page
  • Make a modification, press save
  • No copyright notice, but you should see one

Untagging Growth-Team as appears to be a VisualEditor issue.

matmarex moved this task from To Triage to Triaged on the VisualEditor board.

Apparently I forgot to add the new property to ve.init.mw.ArticleTarget.prototype.storeDocState. It's an easy fix, but I'd like to think about adding some tests so that it doesn't occur again.

We already have some tests that check for the expected properties in API responses (ApiVisualEditorTest::testLoadEditorBasic, ve.init.mw.DesktopArticleTarget#init), we should expand those.

Change 777005 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Add tests for the expected properties in API result and auto-save

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

Change 777031 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Store copyright message in auto-save data

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

Change 777005 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add tests for the expected properties in API result and auto-save

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

Change 777031 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Store copyright message in auto-save data

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

matmarex renamed this task from Suggested edits: copyright message not show in save dialog to Copyright message not show in save dialog after restring from auto-save.Apr 8 2022, 4:20 PM
matmarex renamed this task from Copyright message not show in save dialog after restring from auto-save to Copyright message not shown in save dialog after restoring from auto-save.
matmarex moved this task from Code Review to QA on the Editing-team (FY2021-22 Kanban Board) board.
matmarex added a project: Editing QA.

This seems to work fine now.

The copyright message is displayed in both cases as expected. See https://photos.app.goo.gl/a4erRUpHmy14cUWr7.

For reference: The broken version behaved like https://photos.app.goo.gl/Ur9MuYD4tSK8K5SJ6.