Page MenuHomePhabricator

Enable $wgFixDoubleRedirects on officewiki
Closed, ResolvedPublic

Description

When renaming pages internally, MediaWiki automatically leaves a redirect by default. This is cool. (Because it is, cool!).

However, with time, or when fixing a mistake, it's not unlikely that the new page may at some point be renamed again. This breaks the original redirect. That's not so cool. There are intentional redirects created outside the "rename" feature, such shortcuts, e.g. [[XYZ]] to [[Tech talk/The difference between X, Y and Z (and where is my Oxford comma?)]]. These shortcuts then also lag behind and break. (Because wgMaxRedirect=1, T296430.)

These can and are fixed ad-hoc by experienced editors, but sometimes problems don't require education and training when they can instead be fixed automatically.

It turns out, we already solved this problem over a decade ago. The year 2011 is calling to introduce (r81408): Double-redirect-fixer. After a page move, this automatically tasks the jobqueue with updating incoming references for you.

This feature is disabled by default due to the possibility of misuse on public wikis, where redirects could then be deliberately disrupted en-mass through only a single edit in a way that is hard to undo.

	/**
	 * Automatically update redirects after a page move.
	 *
	 * Can cause page move vandalism, use only on a private wiki.
	 */
	public const FixDoubleRedirects = [
		'default' => false,

Let's use this, on a private wiki.

Event Timeline

A more ideal solution is introduce a proper user right to allow using this feature (T17622: Create a user right to allow using redirect fixer (replacing $wgFixDoubleRedirects)), and $wgFixDoubleRedirects may be removed.

Change 780636 had a related patch set uploaded (by MarcoAurelio; author: MarcoAurelio):

[operations/mediawiki-config@master] Enable $wgFixDoubleRedirects on officewiki

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

Krinkle triaged this task as Medium priority.Apr 19 2022, 7:49 PM

@Bugreporter, so shall that ticket be reopened I guess?

MarcoAurelio changed the task status from Open to In Progress.Apr 19 2022, 8:58 PM
MarcoAurelio claimed this task.
MarcoAurelio lowered the priority of this task from Medium to Low.
MarcoAurelio subscribed.

Assigning as I boldly uploaded a patch for this. I can take care of scheduling it for deployment but I'd be more confortable doing so if at least one or two more +1s are added to the patch.

Notes:

  • It may be a good idea to document what User:Redirect_fixer does on the system user page over there.
  • Same for __STATICREDIRECT__.
  • Please consider using a bot to fix old double or broken redirects (or mark them for deletion if they ain't no longer needed).

Change 780636 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable $wgFixDoubleRedirects on officewiki

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

Mentioned in SAL (#wikimedia-operations) [2022-06-06T13:50:16Z] <urbanecm@deploy1002> Synchronized wmf-config/CommonSettings.php: b7ca9fb268d59a3c2262733df247fb514b97f8b7: Enable $wgFixDoubleRedirects on officewiki (T305782) (duration: 03m 10s)

Mentioned in SAL (#wikimedia-operations) [2022-06-06T13:58:20Z] <urbanecm@deploy1002> Synchronized wmf-config/InitialiseSettings.php: b7ca9fb268d59a3c2262733df247fb514b97f8b7: Enable $wgFixDoubleRedirects on officewiki (T305782) (duration: 03m 27s)

MarcoAurelio removed a project: Patch-For-Review.
MarcoAurelio moved this task from ready/patched/SWAT to cabinet on the User-MarcoAurelio board.

Deployed for officewiki only as requested.