Page MenuHomePhabricator

Accidental creation of placeholder redirects by WikiEditor
Open, Needs TriagePublicFeature

Description

Steps to replicate the issue:

  • Go to a wiki that has Extension:WikiEditor installed (this is most wikis, as the extension is bundled), and where you have the createpage user right.
  • Click on a red link to start to create a page
  • Click on the redirect button on the WikiEditor toolbar
  • Click “save” without making any other changes

What happens?:

A redirect is created with the code:

#REDIRECT [[Target page name]]

Note that the target is localised to wikieditor-toolbar-tool-redirect-example. The exact variable name depends on the user's language settings, not the wiki's default language. So, if I change my language to French in Special:Preferences, the generic target becomes Nom de la page de destination.

From 1.44+ this will throw the broken redirect error if [[Target page name]] doesn't exist on the wiki (T326057: No warning on creating broken redirect to red link). However, it won't throw any error if [[Target page name]] exists as a page (e.g. https://patchwork-pals.fandom.com/wiki/Target_page_name). It will alternatively throw a double redirect error if it happens to be a redirect pointing somewhere else (e.g. https://www.mediawiki.org/w/index.php?title=Target_page_name&redirect=no).

This is a bit of a mess.

Feature summary

It may be worth throwing a more specific error here. Something like:

You are attempting to create a redirect, but the target of your redirect is the generic placeholder Target page name. This is probably a mistake. Please consider adjusting the target page name to a suitable target. If you click save again without changing the target, it will be created anyway.

Benefits

Discourages creation of placeholder redirects, improving wiki quality and usability.

Notes

This should likely be handled by the WikiEditor extension, not core MediaWiki, to avoid affecting installations without this extension (if there any any).