Section(?) edit links aren't re-set-up on save, so clicking on section link opens OWE and then switches to NWE on second edit without a refresh
Closed, ResolvedPublic8 Story Points

Description

Steps to reproduce:

  1. Go to Preferences and set Editing mode to "Always give me Source Editor"
  2. Now click on section link to open NWE
  3. Make some changes and save
  4. Click on section link again to open NWE

Observed Result:
Instead of opening NWE its opening OWE

Ryasmeen created this task.Nov 18 2016, 5:22 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 18 2016, 5:22 AM
Jdforrester-WMF triaged this task as Normal priority.Nov 21 2016, 10:10 PM
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF raised the priority of this task from Normal to High.Dec 13 2016, 11:25 PM

I can't replicate step 2 — now when "always source mode" I'm getting OWE not NWE.

Ryasmeen added a comment.EditedDec 14 2016, 10:47 PM

James, yeah I missed a step here, sorry. I enabled NWE mode from Preferences first. Then step2 will open NWE. But after I save some changes using NWE and click on section link again, it opens OWE instead of NWE.

T153561 is probably the same bug?

Jdforrester-WMF renamed this task from Clicking on section link opens OWE instead of NWE when Editing mode is set to "Always Source Editor" to Clicking on section link opens OWE instead of NWE when Editing mode is set to "Always Source Editor" on second edit without a refresh.Feb 6 2017, 7:11 PM
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF renamed this task from Clicking on section link opens OWE instead of NWE when Editing mode is set to "Always Source Editor" on second edit without a refresh to Section edit links aren't re-set-up on save, so clicking on section link opens OWE and then switches to NWE on second edit without a refresh.Feb 21 2017, 7:43 PM
Jdforrester-WMF renamed this task from Section edit links aren't re-set-up on save, so clicking on section link opens OWE and then switches to NWE on second edit without a refresh to Section(?) edit links aren't re-set-up on save, so clicking on section link opens OWE and then switches to NWE on second edit without a refresh.Feb 21 2017, 8:12 PM
Elitre added a subscriber: Elitre.Feb 28 2017, 11:19 AM
DLynch added a subscriber: DLynch.Mon, Oct 16, 5:03 PM

I fixed something related for T159374, so this bug is now better-fixed. Current state is that in "always source" mode, the section-edit link after saving will still open visual mode.

It does this for a conflux of reasons:

  1. replacePageContent assumes it just has to set up the visual half of the links, and so hardcodes 'visual'.
  2. The post-save HTML that's returned has the links coded for visual-mode, and we're not running the normal page-setup transforms on them.

So, fixing that.

Change 384560 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/VisualEditor@master] init.mw.DesktopArticleTarget: properly set up section links

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

Change 384560 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] init.mw.DesktopArticleTarget: properly set up section links

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

Deskana changed the point value for this task from 1 to 8.Tue, Oct 17, 4:47 PM
Deskana assigned this task to DLynch.
Deskana closed this task as Resolved.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptTue, Oct 17, 4:47 PM