Page MenuHomePhabricator

GoToComment does not work for certain characters in comment IDs
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

The page (correctly) finds the comment, but then displays that fact with malformed markup:

If it only appears in the current revision of one page, you can [[Special:GoToComment/c-ThatRobloxianuser2K6-20250128053500-Broken_file_uploads_on_Miraheze????_help_me_pls!_>;(|go directly to the comment using this link]]. Otherwise it will redirect to these search results.

image.png (140×1 px, 32 KB)

What should have happened instead?:

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Restricted Application added subscribers: Reception123, Aklapper. · View Herald Transcript
Pppery removed a subscriber: Reception123.

(Sorry Miraheze for using a comment about you as a testbed for my Flow export script ...)

It doesn't work because > is not a valid character in page titles (it's only valid in IDs / fragments), so we can't link to this comment using the wikitext permalink syntax.

The Special:GoToComment page could alternatively take the ID as a query parameter (like https://www.mediawiki.org/wiki/Special:FindComment?idorname=c-ThatRobloxianuser2K6-20250128053500-Broken_file_uploads_on_Miraheze%3F%3F%3F%3F_help_me_pls!_>%3B(), but that kind of link also couldn't be used in a wikitext link.

We could just hide that message when the page title would be invalid (since you in fact can not go directly to the comment using that link), and give up on solving the underlying problem. It is hopefully rare.

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

[mediawiki/extensions/DiscussionTools@master] SpecialFindComment: Hide link to GoToComment if it would be invalid

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

Change #1130709 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] SpecialFindComment: Hide link to GoToComment if it would be invalid

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