Page MenuHomePhabricator

Introduce a MediaWiki tracking category for broken redirects to sections
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
T430759 reminded me that, while I sort of solved this issue with https://ru.wikipedia.org/wiki/Модуль:RedirectChecker for Russian Wikipedia, we should resolve it on MediaWiki level since any such solution could end up breaking from software changes.

So here’s the basic proposition: there should be a MediaWiki tracking category, probably populated in all projects unless they explicitly disable it, that checks redirect pages that link to sections/anchors for whether an anchor exists on that page. Essentially it would need to check against HTML ids in the rendered page content since that’s the only reliable indicator of a link leading to a (likely) correct location.

In an even more ideal scenario, there should be a customisable MediaWiki message that would be displayed on the redirect page in this case if a community desires that (but technically that might be possible to do via Lua access to categories? not sure).

While similar to T395298: Throw error message on attempt to create "Broken section redirect" to section that doesn't exist on page that does exist., this is broader in scope.

Benefits (why should this be implemented?):

  1. Link rot can be solved by editors more efficiently.
  2. Modules like https://ru.wikipedia.org/wiki/Модуль:RedirectChecker or bots for tagging such pages are no longer required.
  3. Wikimedia projects get a bit better for readers.