Page MenuHomePhabricator

"Topic not found" notification is shown on non existing anchors for pages that aren't tagged as talk pages
Closed, ResolvedPublic

Description

I used https://www.mediawiki.org/wiki/Help:Edit_check#rc to access a page. On that page the "rc" anchor doesn't exist.

I got the top-right notification "This topic could not be found. It might have been deleted, moved or renamed."

I tested it at another wiki, with the same outcome:

Capture d’écran_2024-09-12_11-20-51.png (1,291×560 px, 137 KB)

I checked several namespaces at both French Wikipedia and Mediawikiwiki, none of them hosting conversations:

  • Shown on :
    • Wikipedia namespace, on a page that is not hosting conversations
    • Help namespace
    • Project (Mediawiki ns-4; fr.wp ns-102)
  • Not shown on
    • main space
    • template namespace

Event Timeline

Makes sense.

Help, Wikipedia, and Project are all signature-wanting namespaces on the default wikimedia config, so DiscussionTools is loaded there. The page doesn't currently have any discussions on it, but the code can't tell the difference between that and, say, a page that just had all its discussions archived.

If we wanted an extra layer of avoiding showing this message on inappropriate pages, we could perhaps add a check based on whether the page has ever had a discussion on it. I think that could be extracted from the permalinks database.

Change #1072557 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Find comment: Don't show notice if "talk" page has never had any discussions on it

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

Change #1072557 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Find comment: Don't show notice if "talk" page has never had any discussions on it

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

Change #1073845 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/DiscussionTools@master] Find comment: limit DB query for page comments, use a custom exception

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

Change #1073845 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Find comment: limit DB query for page comments, use a custom exception

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