Page MenuHomePhabricator

"→(top)" link broken on diff or permalink
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Save an edit with a summary containing /* */
  • Open the diff or permalink for the edit (e.g. (1), (2))
  • Inspect the "→(top)" part of the summary

What happens?:
The link points to https://[domain]/wiki/.

What should have happened instead?:
The link points to the same page as it does on other pages (history, RecentChanges, Contributions, etc.), i.e. https://[domain]/wiki/[page name].

Other information:
Doesn't happen when diffonly=1.

See T412472: Allow formatting empty autocomments in edit summaries for /* */.

Event Timeline

Change #1274043 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Fix "same page" links generated from empty autocomments

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

Change #1274043 merged by jenkins-bot:

[mediawiki/core@master] Fix "same page" links generated from empty autocomments

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

I've noticed that [[#|foo]] in wikitext still becomes a link to //[domain]/wiki/. I find this unexpected because if you can link to a certain place in an edit summary, it's natural to assume you can in wiki content too.

I agree that's weird, but it's not my fault, it was like this before. The change here only affected links generated by /* */.

I think that's basically the issue discussed at T19006: Blank anchor [[#|anchor link]] should not link to the Main Page. I added some test cases and ideas there.