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
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
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Krinkle | T11237 SpecialBrokenRedirect should not list interwiki redirects | |||
Resolved | None | T16418 Add rd_interwiki colum to redirect table |
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_from | page | rd_ns | rd_title |
+---------+-------------------------------------+-------+-----------------------------+
738405 | [[nl:User:Joep_Vullings/Bijdragen]] | -1 |
Contributions/Joep_Vullings |
799878 | [[nl:User:DieBuche]] | 0 | Leo2004 |
708084 | [[nl:User:Lio]] | 0 | User:Lio |
796201 | [[nl:User:Mentatus]] | 0 | User:Mentatus |
697350 | [[nl:User:Olessi]] | 0 | User:Olessi |
584220 | [[nl:User talk:Alno]] | 0 | User_talk:Alno |
764980 | [[nl:User talk:Mausy5043]] | 0 | User_talk:Mausy5043 |
697354 | [[nl:User talk:Olessi]] | 0 | User_talk:Olessi |
684437 | [[nl:User talk:Rei-bot]] | 0 | User_talk:Rei-artur |
801075 | [[nl:User:Hoek-hoek]] | 0 | Utilisateur:Coin-coin |
282711 | [[nl:User talk:Bggoudje]] | 0 | |
Потребител_беседа:Bggoldie |
108988 | [[nl:User:Rh-Kiriki]] | 0 | 利用者:霧木諒二 |
+---------+-------------------------------------+-------+-----------------------------+
Confirming this bug still exists in MW 1.10.1. The page content:
#REDIRECT [[Special:Listusers]]
causes an entry to appear on Special:Brokenredirects.
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.
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
Comment on attachment 4112
Patch
The proposed patch to bug 14418 makes this as easy as adding rd_interwiki != '' to the WHERE clause.
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
+-----------+-------+--------------+----------+--------------+
namespace | title | rd_namespace | rd_title | rd_interwiki |
+-----------+-------+--------------+----------+--------------+
0 | Test2 | 0 | Test | wikipedia |
+-----------+-------+--------------+----------+--------------+
[[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
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
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.