Page MenuHomePhabricator

Red link to a comment on Special:FindComment
Closed, DuplicatePublic

Description

While reviewing some comment data for T321228, I ran into this: https://en.wiktionary.org/wiki/Special:FindComment/c-Stephen_G._Brown-2006-05-02T09:16:00.000Z

image.png (2×3 px, 465 KB)

The page obviously exists (it's the same page as the other links in the list), so this is unexpected.

I looked up the raw data, and it's trying to link to this comment: https://en.wiktionary.org/wiki/User_talk:Connel_MacKenzie/Normalization_of_articles#c-Stephen_G._Brown-2006-05-02T09:16:00.000Z-7._Templates_generally_prohibited_in_headings_and_translation_sections_(notable_. The problem is that MediaWiki considers that to be an invalid title (due to a _ at the end of the ID), and therefore assumes it can't exist.

If you tried to have a heading ending with _, it would indeed be removed from its ID, but for id attributes as we use them, this seems perfectly fine. We should probably just change the code of Special:FindComment a bit so that we don't try to construct a title, but just a link.