Page MenuHomePhabricator

Middle-clicking Edit button on a redirect page opens the editor for the target page instead of the redirect itself
Closed, ResolvedPublic

Description

Suppose that I want to edit a redirect page. If I click Edit button using left mouse button, the editor opens as expected. However, if I use middle button (to open the editor in a new tab), the editor opens for the target of the redirect, not for the redirect itself.

I found that left button clicks are handled by JavaScript, but a middle click results in loading a URL like https://en.wikipedia.org/w/index.php?title=Page_title&veaction=editsource. In particular, redirect=no parameter is not added, so a redirection is performed. Surprisingly, the behavior differs between veaction=edit and veaction=editsource: while for the former, redirect=no is implied (see task T67926), for the latter, it is not (see task T156042). So, either the behavior of veaction=editsource should be changed to match the behavior of veaction=edit, or redirect=no should be added to Edit button URL on redirect pages.

Event Timeline

So this is not in the 2017 wikitext editor?

I observe the same behaviour as stated in this comment.

So this is not in the 2017 wikitext editor?

No. This is in the 2017 wikitext editor and not in the VisualEditor. IOW, trying to open Edit in new tab doesn't have issues (as long as it's bound to the VisualEditor) while trying to open Edit Source does have issues.

I have same problem using left button click

Change 471239 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Assume 'redirect=no' for all page views with 'veaction', not just 'veaction=edit'

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

Change 471239 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Assume 'redirect=no' for all page views with 'veaction', not just 'veaction=edit'

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