Page MenuHomePhabricator

Some records in table "templatelinks" refer to non-existing pages
Closed, ResolvedPublic

Description

At pt.WIKTIONARY (not ptwiki!), there are old records in the templatelinks table which currently refer to non-existing pages:

http://pastebin.com/1BHNgbqX

(the above SQL statement should have returned an empty result set).

Please delete these records which are interfering with the generation of special pages (namely, Special:WantedTemplates).

P.S.: pagelinks table could analogously be checked for consistency (categorylinks was fixed previously in bug:19969) and in case of bad records, these could also be deleted.

Thanks!


Version: unspecified
Severity: major

Details

Reference
bz23964

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:05 PM
bzimport set Reference to bz23964.
bzimport added a subscriber: Unknown Object (MLST).

In case the paste bin expires, here's the result:

mysql> select distinct tl_from from templatelinks left join page on page_id=tl_from where page_title is null;
+---------+
| tl_from |
+---------+
|    3364 |
|    3612 |
|    3697 |
|    3722 |
|    4996 |
|    5055 |
|    5136 |
|    5139 |
|    5497 |
|    5506 |
|    5508 |
|    5729 |
|    6088 |
|    6093 |
|    6098 |
|    6099 |
|    6100 |
|    6102 |
|    6104 |
|    6106 |
|    6109 |
|    6110 |
|   14604 |
|   14628 |
|   14629 |
|   14822 |
|   16128 |
|   16228 |
+---------+
28 rows in set (7.59 sec)

Simplifying people's work, could you please run the following in pt.wiktionary:

delete from templatelinks where tl_from in (select distinct tl_from from templatelinks left join page on
page_id=tl_from where page_title is null);

Thanks.

(In reply to comment #2)

Simplifying people's work, could you please run the following in pt.wiktionary:

delete from templatelinks where tl_from in (select distinct tl_from from
templatelinks left join page on
page_id=tl_from where page_title is null);

Thanks.

Done, was only 60 rows anyway.

60 *nasty* rows that were messing with our Special pages :).
Thanks, Roan! Let's see if the Special pages reflect this change in the next day or two.

(In reply to comment #3)

Done, was only 60 rows anyway.

What about other wikis of WMF? It is possible to check each project? Thanks.