Page MenuHomePhabricator

Double-redirect fixer
Open, LowPublicFeature

Description

Add a simpler way to fix double redirects. Perhaps a button on Special:DoubleRedirects which updates the first redirect to point the 3rd title (if it first checks that there's no other info on the first and second redirects).

The current way is to a) copy the 3rd title, open the first for editing, and enter #REDIRECT [[3rd title]] — this feels like the sort of mechanical edit that shouldn't need a human typist.

Double redirects should also be exposed on the RedirectManager in-edit dialog window (with perhaps a blue dot marker on the toolbar icon when there's a redirect to be fixed).

Notes

  • The redirect fixer is coded in /maintenance/fixDoubleRedirects.php.
  • This may need adapting for bulk executing an array pulled from [[special:DoubleRedirects]].
  • You need to add a button to smash to execute all of this.
  • You might want to restrict the ability to execute this script to admins.

Event Timeline

Related, prevention is better than cure - T326056 would discourage users from creating double redirects by first checking to see if the redirect target is itself a redirect. But maybe a belt and braces approach is required.

There is also

https://www.mediawiki.org/wiki/Manual:$wgFixDoubleRedirects

It is an internal bot called [[User:Redirect fixer]] that fixes double redirects created by page moves. This is not enabled on most (all?) Wikipedias, where bots do this instead. Perhaps this could be adapted to run on any double redirect?

It's unlikely that double redirects will be created now:

  1. T326056 is going to discourage their creation
  2. On smaller wikis where $wgFixDoubleRedirects=true, double redirects created by page moves are automatically fixed.
  3. On bigger WMF wikis, where $wgFixDoubleRedirects=false due to vandalism concerns, there are instead plenty of bots that fix any double redirects.

T382216 is a duplicate of this, but I'm not sure how to merge them.