Page MenuHomePhabricator

Surfaced add link suggestions: in read view tag links do not redirect to relevant section (anchor)
Closed, ResolvedPublic

Description

Steps:

  1. Find edits tagged with Suggested: in read view, e.g. Recent changes with the tag on enwiki beta
  2. Edits tagged with newcomer task read view suggestion do not have anchor links to the relevant section on Help:Growth/Tools/Newcomer_Tasks page:
<span class="mw-tag-marker mw-tag-marker-newcomer_task_read_view_suggestion"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Growth/Tools/Newcomer_Tasks">Suggested: in read view</a></span>

Compare, for example, with newcomer task add link tag:

<span class="mw-tag-marker mw-tag-marker-newcomer_task_add_link"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Growth/Tools/Newcomer_Tasks#s-link">Suggested: add links</a></span>

Event Timeline

Etonkovidova renamed this task from Suggested: in read view tag links do not redirect to relevant section (anchor) to Surfaced add link suggestions: in read view tag links do not redirect to relevant section (anchor) .Mar 24 2025, 4:30 PM

This seems to be a regression from T372175: Allow tag labels and links to be translateable separately.

What we currently have is broken, it drops the #readview:

en.json
{
"tag-newcomer_task_read_view_suggestion": "Suggested: in read view",
"tag-newcomer_task_read_view_suggestion-helppage": "mw:Special:MyLanguage/Help:Growth/Tools/Newcomer_Tasks#readview"
}

What we previously had worked fine, it did indeed link the sub-section:

en.json
{
"tag-newcomer_task_read_view_suggestion": "[[mw:Special:MyLanguage/Help:Growth/Tools/Newcomer_Tasks#readview|Suggested: in read view]]"
}

Though we could also do the same that we do for many other links and use a full URL for an external link, that retains the #readview:

en.json
{
"tag-newcomer_task_read_view_suggestion": "Suggested: in read view",
"tag-newcomer_task_read_view_suggestion-helppage": "https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Growth/Tools/Newcomer_Tasks#readview"
}

Still, this feels like an upstream bug and should ideally be fixed there, because interwiki links should work completely. cc @matmarex

That being said, we can do a quick-fix here on our side and use an external link instead, like we do for the other tags. Pinging @KStoller-WMF for deciding on the urgency and priority.

matmarex added a project: MediaWiki-General.

Feels like a bug to me too. Now that you've reminded me, I remembered that I ran into this problem myself when updating other tags: https://en.wikipedia.org/w/index.php?title=MediaWiki:Tag-discussiontools-newtopic&diff=prev&oldid=1260071196 but that was just one tag on one wiki, and I forgot about it.

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

[mediawiki/core@master] Don't drop fragments in Skin::makeInternalOrExternalUrl()

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

KStoller-WMF moved this task from Incoming to Code Review on the Growth-Team (Current Sprint) board.

Thanks, @matmarex. I'm moving to the Growth sprint workboard so we can track and support code review and QA.

Change #1131396 merged by jenkins-bot:

[mediawiki/core@master] Don't drop fragments in Skin::makeInternalOrExternalUrl()

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

Feels like a bug to me too. Now that you've reminded me, I remembered that I ran into this problem myself when updating other tags: https://en.wikipedia.org/w/index.php?title=MediaWiki:Tag-discussiontools-newtopic&diff=prev&oldid=1260071196 but that was just one tag on one wiki, and I forgot about it.

Thank you!

The change has been merged, and I'm moving this to QA.