Last modified: 2011-04-14 15:11:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17147, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15147 - Double redirects to anchors are displayed wrong on Special:DoubleRedirects
Double redirects to anchors are displayed wrong on Special:DoubleRedirects
Status: NEW
Product: MediaWiki
Classification: Unclassified
Redirects (Other open bugs)
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on: 14418
  Show dependency treegraph
Reported: 2008-08-13 02:01 UTC by Dan Barrett
Modified: 2011-04-14 15:11 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Dan Barrett 2008-08-13 02:01:42 UTC
1. Create an article called "Bad" with the contents:

  #REDIRECT [[Foo#Bar]]

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?
Comment 1 Dan Barrett 2008-08-13 02:03:27 UTC
This this related to bug 14987, which blocked MediaWiki 1.13 RC1?
Comment 2 Huji 2008-08-14 12:50:36 UTC
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.
Comment 3 Chad H. 2008-08-14 12:53:09 UTC
Adding dependency. Currently the fragments aren't stored with the rest of the redirect info, so Special:DoubleRedirects doesn't know about them.
Comment 4 Dan Barrett 2008-08-14 13:44:00 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.