Page MenuHomePhabricator

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 Estimated 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

Event Timeline

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 Medium 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.

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.

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

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 assigned this task to DLynch.
Deskana changed the point value for this task from 1 to 8.