Page MenuHomePhabricator

VisualEditor: Automatically nowiki'ed magic links are shown differently after saving & re-editing round trip
Closed, ResolvedPublic

Description


Version: unspecified
Severity: normal

Details

Reference
bz37940

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:27 AM
bzimport set Reference to bz37940.

Think this issue is going to be fixed by Parsoid as and when this is done. :-)

<nowiki>RFC 12234</nowiki> round-trips just fine in Parsoid (try it at http://parsoid.wmflabs.org/_rtform/), so I think this is a VE bug. Guessing the module, please change as needed.

Behaviour

  1. Enter "RFC 1234" & save; it doesn't auto-nowiki, so you get a page with "RFC 1234" as wikitext which automatically links.
  2. Edit again in VE; you get a link which you could edit.
  3. Saving this without changing causes the link to be unchanged (as expected).
  4. Saving this with a different link doesn't convert
  5. Enter "<nowiki>RFC 1234</nowiki>" in wikitext editor, save.
  6. Edit in VE; you get some text link in an alien node.
  7. Saving this causes the link to be unchanged (as expected).

Fixes for unexpected behaviours above:

  1. This feels a little odd; should magic links be allowed, or should Parsoid (un?)magically wrap them in <nowiki>s?
  2. This probably should be alienated in DM.
  3. If the link won't be alienated (i.e., option 2 is not followed), we'll need to special-case this kind of link and re-generate [[]]s around it (? in DM).

Parsoid HTML+RDFa output for "RFC 1234" as wikitext input is:

<a typeof="mw:ExtLink/RFC" href="//tools.ietfs.org/html/rfc1234" rel="mw:ExtLink/RFC" data-parsoid="{&quot;tsr&quot;:[0,8],&quot;dsr&quot;:[0,8]}">RFC 1234</a>

https://gerrit.wikimedia.org/r/37496 has a fix for this -- but there is more to be tested and done. Work-in-progress. Feel free to report additional failure test cases here.

Think there are still issues to resolve in DM (either options 1. or 2.) - Roan?

Pulling from release; we won't get to this.

(In reply to comment #4)

Behaviour

  1. Enter "RFC 1234" & save; it doesn't auto-nowiki, so you get a page with

"RFC
1234" as wikitext which automatically links.

  1. Edit again in VE; you get a link which you could edit.

This is no longer true. The behavior on master is that the link gets alienated.

  1. Saving this without changing causes the link to be unchanged (as

expected).

  1. Saving this with a different link doesn't convert

You can't do that, because it's an alien. You can remove it as a unit. Bolding it seems to work too, although there's a different bug that causes text to be cut off there, will investigate.

  1. Enter "<nowiki>RFC 1234</nowiki>" in wikitext editor, save.
  2. Edit in VE; you get some text link in an alien node.
  3. Saving this causes the link to be unchanged (as expected).

Also alienated.

Entering "RFC 2822" into an existing paragraph causes Parsoid to <nowiki> the entire paragraph.

Fixes for unexpected behaviours above:

  1. This feels a little odd; should magic links be allowed, or should Parsoid

(un?)magically wrap them in <nowiki>s?

It does this now, although the entire paragraph is wrapped.

  1. This probably should be alienated in DM.

It is now.

  1. If the link won't be alienated (i.e., option 2 is not followed), we'll

need
to special-case this kind of link and re-generate [[]]s around it (? in DM).

Moot, because we have alienation working.

Closing this bug as WORKSFORME. I saw a few weird issues while testing this, but they seem to be Parsoid serialization bugs not directly related to this bug, and I may have an out-of-date library again.

Not WORKSFORME; we actively did something that made this work (just, we didn't notice at the time). :-)