Page MenuHomePhabricator

Special:MyLanguage should not remove section anchor part of a redirection
Closed, ResolvedPublic

Description

On test.wp, [[Redirection toward a translatable page]] redirects to [[Translate test#Main sections]].

Set your language as French, then go to Special:MyLanguage/Redirection toward a translatable page.

Expected destination: [[Translate test/fr#Main sections]].
Actual destination: [[Translate test/fr]].

Event Timeline

Interesting that what is also missing is the message saying that you were redirected.

This seems to only happen when the title given to Special:MyLanguage is a redirect page with a fragment. The regular redirect handling and Special:MyLanguage redirects fail to work together properly.

The section name can be different on the translated page, it's very likely that you can't go to the desired section even if the fragment is preserved.

The section name can be different on the translated page, it's very likely that you can't go to the desired section even if the fragment is preserved.

True: it is T62544 issue. But, for common anchored links, manual anchors are usually manually added to preserve those links.

Last time I checked fragments are not even sent to the server, so I don't think anything can be done in PHP to fix this. Does someone a way to fix this? If not, I suggest to decline this task.

Change 771327 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] SpecialMyLanguage: Preserve the fragment from the redirect target

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

Change 771327 merged by jenkins-bot:

[mediawiki/core@master] SpecialMyLanguage: Preserve the fragment from the redirect target

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

Func claimed this task.

Patch merged.