Page MenuHomePhabricator

[Regression wmf23] On creating a wikilink/an inter-wiki link, the nice regex strips section parts of the link
Closed, ResolvedPublic1 Story Points

Description

On this diff, I've tried to add anchored links with VE to the two last items.

On edition, the link was red. May be related to T112862?

Expectation

  • [[Mw:Flow#Design_FAQ|Design]]
  • [[Mw:Flow#Release_and_features_FAQ|Releases and features]]

Reality

  • [[Mw:Flow|Design]]
  • [[Mw:Flow|Releases and features]]

Event Timeline

Trizek-WMF updated the task description. (Show Details)
Trizek-WMF raised the priority of this task from to Needs Triage.
Trizek-WMF added a subscriber: Trizek-WMF.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 17 2015, 3:21 PM
Trizek-WMF set Security to None.
Jdforrester-WMF renamed this task from Create a link with anchors to an external wiki-link does not work on office wiki to [Regression wmf23] On creating an inter-wiki link, the nice regex strips section parts of the link.Sep 22 2015, 7:09 PM
Jdforrester-WMF triaged this task as Normal priority.
Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF moved this task from TR1: Releases to TR0: Interrupt on the VisualEditor board.
Jdforrester-WMF added a subscriber: cscott.
cscott added a comment.EditedSep 22 2015, 7:19 PM

How exactly was this link created? Pasting a URL? Using the link inspector tool?

(And what regex is the "nice regex", exactly?)

Open a VE editor, write a word hello, select it, apply a link with the value "en:Foo#Bar", save. Link has been changed down to [[en:Foo|hello]].

In the link inspector, the url is *displayed* as "en:Foo#Bar" but mouseover reveals that target href has already been truncated to "en:Foo".

FWIW, *pasting* the string [[mw:Flow#Design FAQ]] or [[mw:Flow#Design FAQ|FAQ]] works fine as a workaround to create the desired link, although this appears as an external link in the link inspector before being saved.

As James explained, I did this:

  1. Open the page with VE editor
  2. Type "Design" and "Releases and features"
  3. Add these two items on a bullet list
  4. Select "Design", create a link, type "mw:Flow#Design_FAQ", hit "done"
  5. Link is broken on the link inspector
  6. Save the page, link is still broken.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJan 22 2016, 4:40 PM

Eight dupes. Maybe we should fix this. :-(

This also affects link that are only a section. E.g. See [[#History]] for more information gets rendered by VE as a redlink normalised on save as wiktext [[|#History]] (note the pipe at the beginning and empty page target).

Jdforrester-WMF raised the priority of this task from Normal to High.Mar 29 2016, 1:17 AM
Krinkle removed a subscriber: Krinkle.Mar 30 2016, 1:45 AM
Elitre renamed this task from [Regression wmf23] On creating an inter-wiki link, the nice regex strips section parts of the link to [Regression wmf23] On creating a wikilink/an inter-wiki link, the nice regex strips section parts of the link.
Elitre added subscribers: Amire80, Zppix.
MSGJ added a subscriber: MSGJ.May 26 2016, 10:51 AM

Just reported the same issue at en:Wikipedia:VisualEditor/Feedback and was directed here. Any progress with this yet?

Nnvu removed a subscriber: Nnvu.Aug 3 2016, 2:24 PM
Nnvu added a subscriber: Nnvu.

Change 303327 had a related patch set uploaded (by Alex Monk):
Take link fragments into account

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

Change 303327 merged by jenkins-bot:
Take link fragments into account

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

Jdforrester-WMF closed this task as Resolved.Aug 8 2016, 11:35 PM

Was this fix deployed yesterday indeed? I am still having problems (in Meta).

Johan added a subscriber: Johan.Aug 10 2016, 11:42 AM

Isn't that because it'll be deployed to Meta 19:00–21:00 UTC today and was deployed to test wikis and mediawiki.org yesterday?

Working fine on the test wiki for me.

It works indeed! Thank you very much. This was the literally most annoying bug in my list as a relatively hapy wiki editor. It was the main reason why I was forced to switch to wikitext editor from my VE default. Thank you again, @AlexMonk-WMF . :)