Another minor problem with T326056: Show a warning on creating double redirect
Steps to replicate the issue (include links if applicable):
- Try to create a redirect to a section redirect, e.g. [[$1]] on MediaWiki Wiki, which redirects to https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Variables
What happens?:
- An error message is thrown per T326056: Show a warning on creating double redirect.
- The error message says "Your target page currently redirects to..." and then gives the target page without the section link to #Section_link
- The part of the message where it suggests a replacement page, however, includes the section link
What should have happened instead?:
The first mention of the redirect's target page in the message should have also included the section link.
Also, there is no colourful formatting of the error message.
Notes
- The double redirect constraint is in includes/editpage/Constraint/DoubleRedirectConstraint.php
- The error message is in MediaWiki:Edit-constraint-doubleredirect
<strong>Warning:</strong> You are trying to redirect this page to a second redirect page, creating a double redirect. Your target page currently redirects to [[$2]]. Please consider revising the content of this redirect as follows: $3 Note: If you click "$1" again, the double redirect will be created anyway.
So $2 needs to include the section link, if there is one.
