Page MenuHomePhabricator

staticredirect Magic word not found
Closed, ResolvedPublic

Description

Author: miguelf

Description:
After upgrading mediawiki from rel-1.13.0rc1 to rel-1.13.4 the site started to crash.

After reviewing the trace below I ended working around the problem by commenting out the staticredirect keyword in the includes/MagicWord.php file as follows (but this is of course a work around until it gets fixed):

static public $mDoubleUnderscoreIDs = array($

'notoc',
'nogallery',
'forcetoc',
'toc',
'noeditsection',
'newsectionlink',
'hiddencat',
#'staticredirect',

);

  • Output trace ----------

Magic word not found

Backtrace:

#0 /opt/mediawiki-1.13.4/includes/MagicWord.php(231): Language->getMagic(Object(MagicWord))
#1 /opt/mediawiki-1.13.4/includes/MagicWord.php(184): MagicWord->load('staticredirect')
#2 /opt/mediawiki-1.13.4/includes/MagicWord.php(529): MagicWord::get('staticredirect')
#3 /opt/mediawiki-1.13.4/includes/MagicWord.php(549): MagicWordArray->getBaseRegex()
#4 /opt/mediawiki-1.13.4/includes/MagicWord.php(652): MagicWordArray->getRegex()
#5 /opt/mediawiki-1.13.4/includes/parser/Parser.php(3369): MagicWordArray->matchAndRemove('This page has b...')
#6 /opt/mediawiki-1.13.4/includes/parser/Parser.php(978): Parser->doDoubleUnderscore('This page has b...')
#7 /opt/mediawiki-1.13.4/includes/parser/Parser.php(321): Parser->internalParse('This page has b...')
#8 /opt/mediawiki-1.13.4/includes/OutputPage.php(528): Parser->parse('This page has b...', Object(Title), Object(ParserOptions), true, true, 446)
#9 /opt/mediawiki-1.13.4/includes/GlobalFunctions.php(616): OutputPage->parse('This page has b...', true, true)
#10 /opt/mediawiki-1.13.4/includes/SkinTemplate.php(337): wfMsgExt('viewcount', Array, '437')
#11 /opt/mediawiki-1.13.4/includes/OutputPage.php(821): SkinTemplate->outputPage(Object(OutputPage))
#12 /opt/mediawiki-1.13.4/includes/Wiki.php(337): OutputPage->output()
#13 /opt/mediawiki-1.13.4/index.php(94): MediaWiki->finalCleanup(Array, Object(OutputPage))
#14 {main}


Version: 1.13.x
Severity: minor
OS: Linux

Details

Reference
bz17414

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:29 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz17414.

Probably due to an outdated message cache

miguelf wrote:

(In reply to comment #1)

Probably due to an outdated message cache

If this is the case, how would one clear the message cache or re-generate it?

Really it *should* do so automatically; this is a recurring issue...

miguelf wrote:

FWIW, I have added the changes to mediawiki-2.13.4 and it fixes the problem.

Closed.

Note: the count() check makes this retroactive (except for langs with fallbacks); otherwise a cache purge is needed.

(In reply to comment #4)

Should be fixed in r47143.

I'm not sure why you think that would fix the problem. There's no data from MagicWord.php cached in the localisation cache, it will contain all magic words listed in the messages file regardless of whether they are listed elsewhere. The change you committed may well have destroyed Miguel's test case, because it would have cleared the localisation cache this one time, but there's no reason to think it would have fixed the underlying issue.