Page MenuHomePhabricator

Double redirects to anchors are displayed wrong on Special:DoubleRedirects
Closed, ResolvedPublic


  1. Create an article called "Bad" with the contents:

    #REDIRECT [[Foo#Bar]]
  1. Visit "Bad" (with redirect=no in the query string) and click the Move tab. Move it to "Bad2", creating a double redirect.
  1. 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?

Version: 1.13.x
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:19 PM
bzimport set Reference to bz15147.
bzimport added a subscriber: Unknown Object (MLST).

This this related to bug 14987, which blocked MediaWiki 1.13 RC1?

Huji added a comment.Aug 14 2008, 12:50 PM
This comment was removed by Huji.

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
  1. With the mouse, the user copies the word "Three" and clicks the Edit link for One.
  1. User pastes "Three" into the edit buffer, "correcting" the redirect, and saves.
  1. 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.

demon removed a subscriber: demon.Aug 23 2015, 4:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 23 2015, 4:01 PM
Meno25 removed a subscriber: Meno25.Feb 22 2016, 6:08 PM
Krinkle removed a subscriber: wikibugs-l-list.

Change 368961 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/core@master] Show anchor in redirect target on Special:DoubleRedirects

Krinkle closed this task as Resolved.Aug 4 2017, 3:01 AM
Krinkle assigned this task to Huji.
Krinkle removed a project: Patch-For-Review.

Change 368961 merged by jenkins-bot:
[mediawiki/core@master] Show anchor in redirect target on Special:DoubleRedirects