Page MenuHomePhabricator

Add a link in VE: don't write to or read from restored edits
Closed, ResolvedPublic

Description

  1. Go to the homepage
  2. Open an "add a link" suggested edit
  3. Open VE
  4. Make a change (accepting or rejecting a link recommendation is enough)
  5. Navigate to the homepage (by clicking the username link at the top of the page), ignoring the browser warning that you're about to lose your changes
  6. Open the same suggested edit again
  7. Open VE again
  8. All link recommendations will appear twice (except the one that you accepted or rejected)

Screenshot from 2020-11-10 15-09-37.png (374×761 px, 85 KB)

Relatedly, if you navigate away or close the tab after making a change, then try to start a normal VE session on the article, you'll get an error saying your changes could not be recovered (this failure is presumably because the DmRecommendedLinkAnnotation class isn't loaded).

When loading VE in add a link mode, we should prevent it from trying to restore an edit. It also should not write to the restored edit store in add a link mode.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kostajh added subscribers: Etonkovidova, kostajh.

I'm not able to reproduce the original bug reports here, so I'm moving into QA. @Etonkovidova could you please check the scenarios listed in the task description and see if you can reproduce?

Etonkovidova claimed this task.

Checked both cases described in the task - both cases do not present any issues. Some additional testing also did not find, so far, any issues.

(1) Returning to an article after discarding Add link recommendation layer

a) Special:HomePageget to the Add link article via Homepageinteract with Add link inspectordo not saveclick on User name link to go Homepageand return to the same article again via Homepage

b) Special:HomePageget to the Add link article via Homepageinteract with Add link inspectordo not saveclick on Read (do not navigate away!)switch to VE
The Add link recommendation overlay would load successfully without double icons and any additional warnings.

(2)

Relatedly, if you navigate away or close the tab after making a change, then try to start a normal VE session on the article, you'll get an error saying your changes could not be recovered (this failure is presumably because the DmRecommendedLinkAnnotation class isn't loaded).

Special:HomePageget to the Add link article via Homepageinteract with Add link inspectordo not savenavigate awaysearch for the article and click on VE

Normal VE mode will load successfully.

mewoph moved this task from Done / QA to April 26 - April 30 on the Add-Link board.
mewoph subscribed.

Reopening this since I was still able to reproduce this issue

Change 683414 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Add a link: don't write or read from restored edits

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

Change 683414 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add a link: don't write or read from restored edits

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

Reopening this since I was still able to reproduce this issue

The issue re-appeared around April 16 - I have the screenshots of that date. Although I believed the steps to reproduce the issue were somewhat different.

Screen Shot 2021-04-16 at 2.50.25 PM.png (685×992 px, 233 KB)
Screen Shot 2021-04-16 at 2.46.45 PM.png (518×506 px, 142 KB)

Re-checked - the issue is not re-producible.

  • any changes to the context items or made in the source editor won't be saved when a user navigates way
  • the standard browser warning will appear
  • returning to a previously edited in Suggested mode article via SE module or, if a user did not leave the page, from Read mode to Edit again - won't display double icons.