Page MenuHomePhabricator

[Regression wmf23] On creating a wikilink/an inter-wiki link, the nice regex strips section parts of the link
Closed, ResolvedPublic1 Estimated 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 raised the priority of this task from to Needs Triage.
Trizek-WMF updated the task description. (Show Details)
Trizek-WMF subscribed.
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 Medium 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.

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.

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 Medium to High.Mar 29 2016, 1:17 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.May 16 2016, 7:35 AM
Elitre added subscribers: Amire80, Zppix.

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

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

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

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