Page MenuHomePhabricator

templatelinks corruption
Closed, DuplicatePublic

Description

I am doing some querying with regards to templates and the first template that I decided to work with exposed an issue. I just ran select count(*) from templatelinks where tl_namespace = 10 and tl_title = "Don't_know"; and it returned 255 however when you join tl_from to page_id (to get where the template is being used) all results are NULL. This shouldn't happen. I suspect either database corruption or incorrect processing of template links.


Version: unspecified
Severity: normal

Details

Reference
bz37417

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:22 AM
bzimport set Reference to bz37417.
bzimport added a subscriber: Unknown Object (MLST).

Doing some investigations and it looks like the newest page is from 2006

Some ghost entries are left in template links, see bug 36195 for maintenance script to be run for that case. Please compare your result of the select against live site (link in comment 1), if that is the same, the NULL entries are not a problem.

Errors are still present in the database

depends on bug 36195 to get the ghost entries removed.

Add a condition/join to check, if the pages exist or use the api to receive the data.

Some ghost entries are left in template links, see bug 36195 for maintenance script to be run for that case.

refreshLinks.php --dfn-only has been manually run on enwiki (see T44180), so the ghost entries should now be gone. The script will also run from cron monthly, so any more that appear should not remain for long.