SpecialBrokenRedirect should not list interwiki redirects
Closed, ResolvedPublic

Description

Author: rotemliss

Description:
It seems that Interwiki redirects and redirects to special pages are listed in
Special:BrokenRedirects in Wikimedia projects now that this list uses the
"redirect" table.


Version: 1.10.x
Severity: normal

bzimport set Reference to bz9237.
bzimport created this task.Via LegacyMar 9 2007, 2:48 PM
bzimport added a comment.Via ConduitMar 17 2007, 11:45 AM

webboy wrote:

Interwiki redirects shouldn't be in the redirect table OR should have the
interwiki-prefix.

From the redirect table on nlwiki_p (toolserver):
+---------+-------------------------------------+-------+-----------------------------+

rd_frompagerd_nsrd_title
|

+---------+-------------------------------------+-------+-----------------------------+

738405[[nl:User:Joep_Vullings/Bijdragen]]-1

Contributions/Joep_Vullings |

799878[[nl:User:DieBuche]]0Leo2004
|
708084[[nl:User:Lio]]0User:Lio
|
796201[[nl:User:Mentatus]]0User:Mentatus
|
697350[[nl:User:Olessi]]0User:Olessi
|
584220[[nl:User talk:Alno]]0User_talk:Alno
|
764980[[nl:User talk:Mausy5043]]0User_talk:Mausy5043
|
697354[[nl:User talk:Olessi]]0User_talk:Olessi
|
684437[[nl:User talk:Rei-bot]]0User_talk:Rei-artur
|
801075[[nl:User:Hoek-hoek]]0Utilisateur:Coin-coin
|
282711[[nl:User talk:Bggoudje]]0

Потребител_беседа:Bggoldie |

108988[[nl:User:Rh-Kiriki]]0利用者:霧木諒二
|

+---------+-------------------------------------+-------+-----------------------------+

maiden_taiwan added a comment.Via ConduitAug 16 2007, 2:14 PM

Confirming this bug still exists in MW 1.10.1. The page content:

#REDIRECT [[Special:Listusers]]

causes an entry to appear on Special:Brokenredirects.

bzimport added a comment.Via ConduitAug 16 2007, 2:32 PM

webboy wrote:

The problem with special pages can be fixed by the patch for bug 7890

bzimport added a comment.Via ConduitSep 15 2007, 2:57 AM

rotemliss wrote:

(In reply to comment #1)

Interwiki redirects shouldn't be in the redirect table OR should have the
interwiki-prefix.

I think it's better to remove them from the redirect table, because they are not usable there.

bzimport added a comment.Via ConduitSep 15 2007, 3:03 AM

rotemliss wrote:

Patch

This patch removes interwiki redirects from the redirect table. Note that an actual edit (not a blank edit or action=purge) on the redirect page is required for the redirect table update.

attachment patch ignored as obsolete

Meno25 added a comment.Via ConduitDec 7 2007, 12:04 PM

*** Bug 9960 has been marked as a duplicate of this bug. ***

Catrope added a comment.Via ConduitAug 7 2008, 12:10 PM

Comment on attachment 4112
Patch

The proposed patch to bug 14418 makes this as easy as adding rd_interwiki != '' to the WHERE clause.

IAlex added a comment.Via ConduitNov 27 2009, 8:36 PM
  • Bug 21666 has been marked as a duplicate of this bug. ***
Duke33 added a comment.Via ConduitMar 1 2010, 5:19 PM

I don't see this any longer. Is this still a valid bug, or was the fix implemented?

Reedy added a comment.Via ConduitFeb 11 2011, 1:20 AM

This seems to still be a valid bug, using the basic query used in SpecialBrokenRedirects, adding in the rd_interwiki col, we get the below

mysql> SELECT p1.page_namespace AS namespace,p1.page_title AS title,rd_namespace,rd_title,rd_interwiki FROM mw_redirect LEFT JOIN mw_page p1 ON ((rd_from=p1.page_id)) LEFT JOIN mw_page p2 ON ((rd_namespace=p2.page_namespace) AND (rd_title=p2.page_title)) WHERE (rd_namespace >= 0) AND (p2.page_namespace IS NULL) ORDER BY rd_namespace, rd_title, rd_from LIMIT 50\g
+-----------+-------+--------------+----------+--------------+

namespacetitlerd_namespacerd_titlerd_interwiki

+-----------+-------+--------------+----------+--------------+

0Test20Testwikipedia

+-----------+-------+--------------+----------+--------------+

[[Test2]] -> #REDIRECT [[wikipedia:Test]]

The following redirects link to non-existent pages:
Showing below up to 1 result starting with #1.
View (previous 50 | next 50) (20 | 50 | 100 | 250 | 500)
Test2 (edit | delete) → Test

So would look like this still needs fixing. But if the fix is so simple, we should do it and get this bug closed :)

Would

SELECT p1.page_namespace AS namespace,p1.page_title AS title,rd_namespace,rd_title,rd_interwiki FROM mw_redirect LEFT JOIN mw_page p1 ON ((rd_from=p1.page_id)) LEFT JOIN mw_page p2 ON ((rd_namespace=p2.page_namespace) AND (rd_title=p2.page_title)) WHERE (rd_namespace >= 0) AND (p2.page_namespace IS NULL) ORDER BY rd_namespace, rd_title, rd_from LIMIT 50\g

to

SELECT p1.page_namespace AS namespace,p1.page_title AS title,rd_namespace,rd_title,rd_interwiki FROM mw_redirect LEFT JOIN mw_page p1 ON ((rd_from=p1.page_id)) LEFT JOIN mw_page p2 ON ((rd_namespace=p2.page_namespace) AND (rd_title=p2.page_title)) WHERE (rd_namespace >= 0) AND (p2.page_namespace IS NULL) AND (rd_interwiki = '') ORDER BY rd_namespace, rd_title, rd_from LIMIT 50\g

(that is, adding "AND (rd_interwiki = '') "), be enough to fix this? That way the brroken redirect query isn't including things that redirect to IW

Peachey88 added a comment.Via ConduitApr 30 2011, 12:09 AM

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

Krinkle added a comment.Via ConduitSep 19 2012, 2:42 PM

See also bug 40352 and 40353. Going to tackle this.

(In reply to comment #10)

This seems to still be a valid bug, using the basic query used in
SpecialBrokenRedirects, adding in the rd_interwiki col

[..]

(that is, adding "AND (rd_interwiki = '') "), be enough to fix this? That way
the brroken redirect query isn't including things that redirect to IW

I just ran into this bug on an old wiki that I upgraded from MediaWiki 1.8.2 to 1.20alpha.

That works indeed, except it also needs rd_interwiki IS NULL. For some reason it can be both null or empty string.

Fix in Ifee9fdcdd3a327742b18cfcc2a235e1e24c062bf.

Add Comment