Page MenuHomePhabricator

$wgMaxRedirects does not appear to work as intended
Closed, DuplicatePublic

Description

$wgMaxRedirects only seems to allow a value of 1 or 0 - anything higher just leads to it defaulting to a value of 1. Not sure if this is intended or fixable. Tested on MW 1.26.2

Event Timeline

Mdann52 raised the priority of this task from to Low.
Mdann52 updated the task description. (Show Details)
Mdann52 added a project: MediaWiki-Redirects.
Mdann52 subscribed.

@Mdann52 What does not work with $wgMaxRedirects > 1? What do you expect how it should work?

So what happens is that the expected behaviour should be it follows X redirects (so if x=2, it will go a>b>c), however currently it only follows one (and shows the redirect page to c). I'd expect it to follow the number of redirects specified.

When you create an article c and a redirect b pointing to c and a redirect a pointing to b.

When you now open title=a&redirect=no you get

  • with $wgMaxRedirects = 1:

↳ c

  • with $wgMaxRedirects = 2:

↳ b → c

Therefor $wgMaxRedirects = 1 and $wgMaxRedirects = 2 create a difference.

When you create an article c and a redirect b pointing to c and a redirect a pointing to b.

When you now open title=a&redirect=no you get

  • with $wgMaxRedirects = 1:

↳ c

There is a small mistake: This does not result in ↳ c, but in ↳ b.

I do not understand your answer.

I edited the post in an attempt to improve it, hope it's clear now.

Thanks for clarification.

I retested with my local installation with $wgMaxRedirects = 2. I get for title=a&redirect=no

↳ b → c

I created the links by moving an article from a to b and from b to c.

@Mdann52 Are you sure you have not fallen victim to the bug T32359? Let us have $wgMaxRedirects = 2 and a redirect from A to B. If you complete your redirect chain by moving B to C, then the double redirect from A through B to C will not be followed due to that bug. However, if you create the redirect from A to B as the last operation, it should work.

@Fomafix That means that my claim applies only to $wgMaxRedirects = 1. I edited the post once again and hope that my critique is correct now.

Yes, this was a mistake in my comment. With $wgMaxRedirects = 1 title=a&redirect=no results:

↳ b