Page MenuHomePhabricator

Broken section links to mentee's published question – double hash ## in url
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

After posting a message to a mentor via the Your Mentor module, the mentee receives a faulty link to their question containing a reduplicated hash ('##') in the url. This breaks the section link (url fragment) in two places:

  • in the 'Your question has been published!' dialog pop-up immediately after publication. The link underlies the anchor text 'View your question on your mentor's talk page.'
  • in the Your mentor module, under the 'Your recent questions' section, underlying anchor text consisting of a copy of the first ten words or so of the mentee question.

{F93460821,layout=right, float, width=185} The links with broken fragments gracefully degrade to top-of-page on the Mentor talk page, but they also get a small pop-up dialog box that says, 'This topic could not be found. It might have been deleted, moved, or renamed.'

Given the mentee's newness (often their very first edit at Wikipedia), imho, this is functionally equivalent to sending them to the wrong page entirely.

Real-world test: url generated was: https://en.wikipedia.org/wiki/User_talk:Alextejthompson##Question_from_Mathglot_(19:32,_13_July_2026)

Steps to replicate the issue :

  1. go to your Mentor module
  2. click the button to ask your mentor a question about editing
  3. in the Ask your mentor pop-up, enter your question and click Publish
  4. the 'Your question has been published!' dialog pop-up should appear
  5. mouse over or click the anchor text 'View your question on your mentor's talk page'

What happens?:

  • it goes to the top of the mentor talk page when clicked (notice the double hash in the url)
  • you get a pop-up dialog, 'This topic could not be found. It might have been deleted, moved, or renamed.'

What should have happened instead?:

  • it should go to the section containing the question the mentee just posed.
  • there should be no 'not found' pop-up.

Steps to replicate the second issue:

  1. go back to your Mentor module
  2. find your question under the 'Your recent questions' section
  3. click your question

What happens?:

  • same result as above

What should have happened instead?:

  • same as outcome above

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mathglot updated the task description. (Show Details)
Mathglot updated the task description. (Show Details)
Mathglot renamed this task from Broken section links post mentee question publication – double hash ## in url to Broken section links to mentee's published question – double hash ## in url.Jul 13 2026, 10:00 PM

Change #1310582 had a related patch set uploaded (by Shreyapedia; author: Shreyapedia):

[mediawiki/extensions/GrowthExperiments@master] Resolve double hash (##) in mentee question URLs

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

Shreyapedia subscribed.

Hi...I have submitted a patch to resolve this and added integration test assertions.

Patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/1310582

Urbanecm_WMF subscribed.

Has a seemingly-working community-authored patch, let's pull this to code review (I'm taking a look).

Change #1310582 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Resolve double hash (##) in mentee question URLs

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

Etonkovidova subscribed.

Checked on enwiki beta - the issue is fixed.

<a href="/wiki/User_talk:ET13#Question_from_ET271_(18:29,_16_July_2026)" target="_blank" data-link-id="view-question">View your question on your mentor's talk page.</a>

Testing notes to check in prod

  • check the old links on Homepage also
testwiki wmf.11testwiki wmf.12
<a href="/wiki/User_talk:Etonkovidova_(WMF)##Question_from_Zilant17_(17:07,_16_July_2026)" target="_blank" data-link-id="view-question">View your question on your mentor's talk page.</a><a class="question-text" href="/wiki/User_talk:Etonkovidova_(WMF)#Question_from_Zilant17_(20:51,_23_July_2026)" data-link-id="growthexperiments-mentor-questions-1">test on wmf.12</a>

Re-checked on testwiki wmf.12 - the new questions are posted correctly on a mentor User talk page; the link to the mentor User talk page works as expected.
Note: the links to older questions are not corrected.

Urbanecm_WMF set the point value for this task to 1.Jul 16 2026, 10:42 PM