Page MenuHomePhabricator

Double redirect error message omits section link in target page display
Closed, ResolvedPublicBUG REPORT

Description

Another minor problem with T326056: Show a warning on creating double redirect

Steps to replicate the issue (include links if applicable):

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.

Event Timeline

Change #1225114 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/core@master] RedirectConstraint: include fragment in double redirect error message

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

Change #1225114 merged by jenkins-bot:

[mediawiki/core@master] RedirectConstraint: include fragment in double redirect error message

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