Last modified: 2014-07-29 01:43:14 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 T54127, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52127 - VisualEditor: Editing a link spanning a comment splits the link
VisualEditor: Editing a link spanning a comment splits the link
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: High major
: VE-deploy-2014-07-24
Assigned To: Roan Kattouw
:
Depends on:
Blocks: ve-linkediting
  Show dependency treegraph
 
Reported: 2013-07-26 22:47 UTC by Excirial
Modified: 2014-07-29 01:43 UTC (History)
6 users (show)

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


Attachments

Description Excirial 2013-07-26 22:47:39 UTC
Tested on Firefox 22 (Monobook) and Chrome 28 (Vector)

Steps to reproduce:
- Edit the [[Nodeulseom]] page in the visual editor.
- Click reference [1] and edit it.
- Click the hyperlink in the reference and point it to "http://www.koreatimes.co.kr/" (Eg: Just remove the last part from the reference)
- Apply the change.
- Hit "Save Page" and review the changes.

Instead of replacing the old link, it seems that the preview suggest that the link will be duplicated, leaving both the old and new link in the reference.

(Diff)
<ref>[http://www.koreatimes.co.kr/ (The Korea Times)][http://www.koreatimes.co.kr/www/news/nation/nation_view.asp?newsIdx=5635&categoryCode=115 <!-- Bot generated title -->]</ref>
Comment 1 Roan Kattouw 2014-06-19 03:49:17 UTC
This is a more general problem. We never unannotate comments or any other metadata. For instance:

* If you have [[Foo|Bar<!--Baz-->Quux]] and change the link target, you'll split the link: [[Foo2|Bar]][[Foo|<!--Baz-->]][[Foo2|Quux]] (that's also what happened here)
* If you have Foo<!--Bar-->Baz, it renders as "FooBar". If you then make that italic, you'll get ''Foo''<!--Bar-->''Baz''

The root of the problem is that ve.dm.TransactionProcessor#applyAnnotations doesn't annotate/unannotate metadata. Tomorrow I'll see if I can write a failing test case and fix applyAnnotations()
Comment 2 Gerrit Notification Bot 2014-06-20 21:19:45 UTC
Change 141063 had a related patch set uploaded by Catrope:
Also annotate metadata in TransactionProcessor

https://gerrit.wikimedia.org/r/141063
Comment 3 Gerrit Notification Bot 2014-06-27 21:49:42 UTC
Change 141063 merged by jenkins-bot:
Also annotate metadata in TransactionProcessor

https://gerrit.wikimedia.org/r/141063
Comment 4 James Forrester 2014-06-27 22:53:48 UTC
(In reply to Gerrit Notification Bot from comment #3)
> Change 141063 merged by jenkins-bot:
> Also annotate metadata in TransactionProcessor
> 
> https://gerrit.wikimedia.org/r/141063

Helpfully, this doesn't actually fix the bug (just a number of related bugs where the comment isn't on the edge of the link). Assigned.
Comment 5 James Forrester 2014-07-29 01:43:14 UTC
This is now fixed because comments are editable (finally), but there's a wider, lower-priority issue for non-comments, for which I have created bug 68779 to track.

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


Navigation
Links