Another minor issue with T326056: Show a warning on creating double redirect
Steps to replicate the issue
- Create a self-redirect page, e.g. at [[Foo]]. Ignore any errors thrown when doing this -- work on the assumption that some other numpty did it.
- Try to create a redirect to the self-redirect page, [[Foo]] from somewhere else, e.g. [[Bar]].
What happens?
An error is thrown per T326056: Show a warning on creating double redirect, which suggests the target page be "changed" to [[Foo]]. Of course, the original target page specified was [[Foo]].
What should have happened instead?:
DoubleRedirectConstraint should check that the redirect target of a page isn't a redirect to itself. If it is, it needs a specific error message; something like:
You are trying to redirect this page to a self-redirect. Please consider what you are doing.