From a161c5eea47b07e4212a4fde6d6c3f8ba130d47c Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 20 Nov 2012 21:43:55 +0400 Subject: [PATCH] (bug 37209) Title no longer relies on entries already being in LinkCache This fixes "LinkCache doesn't currently know about this title" error in some cases, for example, in the case when LinkCache is flushed. Change-Id: I2fc3966ee5d462ba050a6c54cfda1a0dfd972635 --- RELEASE-NOTES-1.21 | 1 + includes/Title.php | 1 + 2 files changed, 2 insertions(+) diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index f19a1b08e0..e8a143288f 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -140,6 +140,7 @@ production. * (bug 41733) Hide "New user message" (.usermessage) element from printable view. * (bug 39062) Special:Contributions will display changes that don't have a parent id instead of just an empty bullet item. +* (bug 37209) "LinkCache doesn't currently know about this title" error fixed. * wfMerge() now works if $wgDiff3 contains spaces === API changes in 1.21 === diff --git a/includes/Title.php b/includes/Title.php index 48791f02dc..60e3a1abbf 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2986,6 +2986,7 @@ class Title { return $this->mLatestID = 0; } $linkCache = LinkCache::singleton(); + $linkCache->addLinkObj( $this ); $cached = $linkCache->getGoodLinkFieldObj( $this, 'revision' ); if ( $cached === null ) { # check the assumption that the cache actually knows about this title # XXX: this does apparently happen, see https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 -- 2.20.1