Page MenuHomePhabricator

"Open" button in the Link tool lead to a broken or incorrect target if on a /w/ entry point
Closed, ResolvedPublic1 Estimated Story Points

Description

VEdit https://en.wikipedia.org/w/index.php?title=Tracey_Ferguson&veaction=edit .
Find the word "operation", and try to make that a wikilink to "operate".
Notice the dropdown features both "operate" and "Operate", but you need to choose the former to see the bug.
After you've selected this target, try to click on Open.
Notice you've been brought to the non existent "Operat" article (in some cases instead you'll be brought to the "former" target, "operation").
Notice everything is fine instead if you select words starting with a capital letter in the first place.

Event Timeline

Elitre raised the priority of this task from to Needs Triage.
Elitre updated the task description. (Show Details)
Elitre added a project: VisualEditor.
Elitre subscribed.

Reproducible

  • select 'operation'(placing a cursor there is enough)
  • clear pre-filled 'operation' in the link inspector or just delete some letters and type to 'operate'

Notice that 'Open' button will redirect to <a class="oo-ui-buttonElement-button" role="button" tabindex="0" href="/wiki/Operat" target="_blank"><span class="oo-ui-iconElement-icon"></span><span class="oo-ui-labelElement-label">Open</span><span class="oo-ui-indicatorElement-indicator"></span></a>

It seems to "discriminate" between upper and lower cases:

  • typing 'Operate' will not have a suggestion 'operate' in the drop-down list
  • once 'Operate' is selected, it'll stick - trying to select 'operate' or change 'Operate' to 'operate' by re-typing in the link inspector - will not change the Open button target for 'Operate'

I also checked T85622 - since Bonjour has suggestions for 'Bonjour' and 'bonjour' - did not notice any discrepancies in re-directing.

Looks like the href of the open button is not getting updated as much as the contents of the input box changes.

It does get updated, but it's always a step behind... Interesting.

Change 182432 had a related patch set uploaded (by Alex Monk):
Link inspector: Set href of open button to new value, not old.

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

Patch-For-Review

Jdforrester-WMF lowered the priority of this task from High to Medium.Jan 15 2015, 12:15 AM

Change 182432 abandoned by Alex Monk:
Link inspector: Set href of open button to new value, not old.

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

After posting my comments about what I was trying to fix in the commit above, I realise I may have been actually chasing a separate bug, and this is breaking things in a different way. Still something we need to fix though.

Actually it sounds like the issue I've been trying to deal with is this part:

in some cases instead you'll be brought to the "former" target, "operation"

Unfortunately properly picking up whether the typed text is for an external or internal link quick enough without waiting for the request to go through, menu to display, etc. would rely on T76398

Jdforrester-WMF renamed this task from "Open" button in the Link tool can sometimes lead to a broken or incorrect target to "Open" button in the Link tool lead to a broken or incorrect target if on a /w/ entry point.Jun 18 2015, 12:50 AM

Change 220307 had a related patch set uploaded (by Alex Monk):
Force 'Open' button for internal links to use full path

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

Change 220307 merged by jenkins-bot:
MWInternalLinkAnnotationWidget: Force 'Open' button to use full path

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