Last modified: 2013-07-10 07:48:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39940, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37940 - VisualEditor: Automatically nowiki'ed magic links are shown differently after saving & re-editing round trip
VisualEditor: Automatically nowiki'ed magic links are shown differently after...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Low normal
: VE-deploy-2013-03-04
Assigned To: Roan Kattouw
:
Depends on: 45062
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-25 20:04 UTC by Liangent
Modified: 2013-07-10 07:48 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2012-06-25 20:04:04 UTC

    
Comment 1 Liangent 2012-06-25 20:04:23 UTC
Magic links: RFC xxx stuff
Comment 2 James Forrester 2012-07-25 00:22:38 UTC
Think this issue is going to be fixed by Parsoid as and when this is done. :-)
Comment 3 Gabriel Wicke 2012-07-25 00:51:24 UTC
<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.
Comment 4 James Forrester 2012-12-07 03:51:50 UTC
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.
4. 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).
Comment 5 James Forrester 2012-12-07 16:56:33 UTC
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>
Comment 6 ssastry 2012-12-07 21:28:14 UTC
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.
Comment 7 James Forrester 2012-12-08 00:47:19 UTC
Think there are still issues to resolve in DM (either options 1. or 2.) - Roan?
Comment 8 James Forrester 2012-12-10 19:41:31 UTC
Pulling from release; we won't get to this.
Comment 9 Roan Kattouw 2013-02-28 22:58:58 UTC
(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.
> 2. 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.

> 3. Saving this without changing causes the link to be unchanged (as
> expected).
> 4. 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.

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

> 2. This probably should be alienated in DM.
It is now.

> 4. 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.
Comment 10 James Forrester 2013-03-04 22:29:06 UTC
Not WORKSFORME; we actively did something that made this work (just, we didn't notice at the time). :-)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links