From 311754120112539f2ad24bb230a9d536b1216802 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Tue, 4 Dec 2012 12:35:01 +0000 Subject: [PATCH] Treat message cache loading as fatal I suspect this is the primary cause we occasionally have * Sidebar stuck in default values * No gadgets at all * Main page full of occurances Change-Id: I811755d4c250800177c4ea9e509bf6e1d13443a0 --- includes/cache/MessageCache.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 9bf743667d..f5feaf9b04 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -347,12 +347,12 @@ class MessageCache { } if ( !$success ) { - # Bad luck... this should not happen - $where[] = 'loading FAILED - cache is disabled'; - $info = implode( ', ', $where ); - wfDebug( __METHOD__ . ": Loading $code... $info\n" ); $this->mDisable = true; $this->mCache = false; + // This used to go on, but that led to lots of nasty side + // effects like gadgets and sidebar getting cached with their + // default content + throw new MWException( "MessageCache failed to load messages" ); } else { # All good, just record the success $info = implode( ', ', $where ); -- 2.20.1