Page MenuHomePhabricator

Visual Editor chops long external links (e.g. to TABernacle tool)
Closed, ResolvedPublic

Description

When copying a url-encoded link from the address bar in the browser in the TABernacle tool and pasting it in Wikipedia into the VE linking gadget, long links get chopped.

I suspect the chopping is caused by link length, but it cal also relate to its complexity.

The bug has been discussed in a Facebook thread https://www.facebook.com/groups/WikidataCommunity/permalink/2394273124191184/

The originating page is https://fi.wikipedia.org/wiki/Wikiprojekti:Oodi/15._hein%C3%A4kuuta_2019 line with text "Vain kohteet, joilta puuttuu nimi | kuvaus ruotsiksi" (subject to change)

The intended link contents can be found here https://docs.google.com/document/d/1eGC85SWaiRkhdM9NpNnxE7JROchg1b4R3Lmp9TTbPKY/edit

And reproduced here https://fi.wikipedia.org/wiki/K%C3%A4ytt%C3%A4j%C3%A4:Zache/virhe

Event Timeline

Simplified steps to reproduce:

If you continue without noticing this (and it's nearly impossible to notice), you'll save the page with the incorrect link.

If you switch to the "External link" tab manually before pasting, the correct full link will be saved.

Apparently it gets cut off after 255 characters, which is the maximum length of a page title in MediaWiki.

Change 526239 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ve.ui.MWInternalLinkAnnotationWidget: Remove 'maxlength' to fix pasting URLs

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

matmarex renamed this task from Visual Editor chops long links to TABernacle to Visual Editor chops long external links (e.g. to TABernacle tool).Jul 29 2019, 8:08 PM
matmarex edited projects, added VisualEditor (Current work); removed VisualEditor.
matmarex moved this task from Incoming to Code review on the VisualEditor (Current work) board.

Change 526239 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ve.ui.MWInternalLinkAnnotationWidget: Remove 'maxlength' to fix pasting URLs

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

ppelberg claimed this task.