Last modified: 2011-04-14 15:11:00 UTC
1. Create an article called "Bad" with the contents:
2. Visit "Bad" (with redirect=no in the query string) and click the Move tab. Move it to "Bad2", creating a double redirect.
3. Visit Special:DoubleRedirects and you'll see:
Bad (Edit) → Bad2 → Foo
This is wrong. Bad2 redirects to Foo#Bar, not Foo.
I wonder what happens if pywikipedia bot tries to fix this double redirect? Will it do the wrong thing?
This this related to bug 14987, which blocked MediaWiki 1.13 RC1?
Well, I think that behavior is not "wrong", as you call it. In act, Bad is redirecting to Bad2 and that redirects to the page "Foo" (although a section of the page). Links go to pages, not sections. If there is an anchor in the link, this is only to help the reader go to the right place in the page. Foo#bar is not a separate page.
However, I agree that this behavior can be changed. But the reason you've given here (pywikipedia bot mistakes) can also be viewed as a limitation of pywikipediabot (it should check the content of double redirects before fixing them blinding). Perhaps we need a better reason to change this behavior.
Adding dependency. Currently the fragments aren't stored with the rest of the redirect info, so Special:DoubleRedirects doesn't know about them.
The current UI can fool people into creating wrong redirects. Here is a common use case where the wrong thing is done by the user.
1. A typical, well-meaning user visits Special:DoubleRedirects and sees:
One [Edit] -> Two -> Three
2. With the mouse, the user copies the word "Three" and clicks the Edit link for One.
3. User pastes "Three" into the edit buffer, "correcting" the redirect, and saves.
4. The entry disappears from Special:DoubleRedirects, so the user thinks he did the right thing.
Except... OOPS!!! Two really pointed to "Three#My Section" The user has now made "One" incorrect.
This use-case is very common. I personally have done it hundreds of times. (Until discovering pywikipedia bot!)
This is why I argued that the current behavior is "wrong."
Hope this makes sense.