Page MenuHomePhabricator

LabeledSectionTransclusion: Fatal error: Call to undefined method Title::getRedirectTarget()
Closed, ResolvedPublic

Description

Fatal error: Call to undefined method Title::getRedirectTarget() in /usr/local/apache/common-local/php-1.21wmf5/extensions/LabeledSectionTransclusion/lst.php on line 305

No stack trace currently as it seems the fatal log is empty...


Version: unspecified
Severity: major

Details

Reference
bz42456

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:59 AM
bzimport set Reference to bz42456.

http://p.defau.lt/?hOOnMmL6voQcgnoX4_1Gpw

[26-Nov-2012 22:14:15] Fatal error: Call to undefined method Title::getRedirectTarget() at /usr/local/apache/common-local/php-1.21wmf5/extensions/LabeledSectionTransclusion/lst.php on line 305
Server: mw11
URL: http://[unknown-host]
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf5/extensions/LabeledSectionTransclusion/lst.php(305): LabeledSectionTransclusion->getWikiPageDom()
#1 /usr/local/apache/common-local/php-1.21wmf5/extensions/LabeledSectionTransclusion/lst.php(367): LabeledSectionTransclusion::getWikiPageDom(Object(Title), Array)
#2 /usr/local/apache/common-local/php-1.21wmf5/extensions/LabeledSectionTransclusion/lst.php(438): LabeledSectionTransclusion::setupPfunc12(Object(Parser), Object(PPTemplateFrame_DOM), Array, 'lst')
#3 [internal function]: LabeledSectionTransclusion::pfuncIncludeObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#4 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(3286): call_user_func_array(Array, Array)
#5 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Preprocessor_DOM.php(1084): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#6 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(3452): PPFrame_DOM->expand(Object(PPNode_DOM))
#7 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Preprocessor_DOM.php(1084): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#8 /usr/local/apache/common-local/php-1.21wmf5/extensions/ParserFunctions/ParserFunctions_body.php(400): PPFrame_DOM->expand(Object(PPNode_DOM))
#9 [internal function]: ExtParserFunctions::ifexistObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#10 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(3286): call_user_func_array('ExtParserFuncti...', Array)
#11 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Preprocessor_DOM.php(1084): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#12 /usr/local/apache/common-local/php-1.21wmf5/extensions/ParserFunctions/ParserFunctions_body.php(400): PPFrame_DOM->expand(Object(PPNode_DOM))
#13 [internal function]: ExtParserFunctions::ifexistObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#14 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(3286): call_user_func_array('ExtParserFuncti...', Array)
#15 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Preprocessor_DOM.php(1084): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#16 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(3452): PPFrame_DOM->expand(Object(PPNode_DOM))
#17 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Preprocessor_DOM.php(1084): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#18 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(3073): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#19 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(1157): Parser->replaceVariables('The Wikimedia F...')
#20 /usr/local/apache/common-local/php-1.21wmf5/includes/parser/Parser.php(385): Parser->internalParse('The Wikimedia F...')
#21 [internal function]: Parser->parse('The Wikimedia F...', Object(Title), Object(ParserOptions), true, true, NULL)
#22 /usr/local/apache/common-local/php-1.21wmf5/includes/StubObject.php(79): call_user_func_array(Array, Array)
#23 /usr/local/apache/common-local/php-1.21wmf5/includes/StubObject.php(99): StubObject->_call('parse', Array)
#24 /usr/local/apache/common-local/php-1.21wmf5/includes/content/WikitextContent.php(290): StubObject->__call('parse', Array)
#25 /usr/local/apache/common-local/php-1.21wmf5/includes/content/WikitextContent.php(290): StubObject->parse('The Wikimedia F...', Object(Title), Object(ParserOptions), true, true, NULL)
#26 /usr/local/apache/common-local/php-1.21wmf5/includes/content/AbstractContent.php(234): WikitextContent->getParserOutput(Object(Title), NULL, NULL, false)
#27 /usr/local/apache/common-local/php-1.21wmf5/includes/job/jobs/RefreshLinksJob.php(81): AbstractContent->getSecondaryDataUpdates(Object(Title), NULL, false)
#28 /usr/local/apache/common-local/php-1.21wmf5/includes/job/jobs/RefreshLinksJob.php(193): RefreshLinksJob::runForTitleInternal(Object(Title), Object(Revision), 'RefreshLinksJob...')
#29 /usr/local/apache/common-local/php-1.21wmf5/maintenance/runJobs.php(83): RefreshLinksJob2->run()
#30 /usr/local/apache/common-local/php-1.21wmf5/maintenance/doMaintenance.php(110): RunJobs->execute()
#31 /usr/local/apache/common-local/php-1.21wmf5/maintenance/runJobs.php(116): require_once('/usr/local/apac...')
#32 /usr/local/apache/common-local/multiversion/MWScript.php(68): require_once('/usr/local/apac...')
#33 {main}

Thanks for fixing this, Sam (also for the wfProfileOuts).

Apparently this was not caught by a parser test, so I'll create some tests for #REDIRECT behavior.

I'll also check whether the "if ( $target )" is redundant or not. In any case, it shouldn't do any harm keeping it there.

It helps when I actually read the error message, hence the first folic.

Said method can return null, though whether it will for your use case... So it shouldn't do any harm at least