Page MenuHomePhabricator

Return value of Parser::getTitle() must be an instance of Title, null returned
Closed, ResolvedPublic

Description

Setup

  • MediaWiki 1.35.0
  • PHP 7.2.24
  • Semantic MediaWiki 3.2.3
  • Page Forms 5.2.1

Issue

[1f86e5749173294303dcdb2f] [no req] TypeError from line 1007 of /../w/includes/parser/Parser.php: Return value of Parser::getTitle() must be an instance of Title, null returned

Backtrace

#0 /../w/extensions/PageForms/includes/PF_FormUtils.php(473): Parser->getTitle()
#1 /../w/extensions/PageForms/includes/PF_FormPrinter.php(937): PFFormUtils::getFormDefinition(Parser, string, integer)
#2 /../w/extensions/PageForms/specials/PF_RunQuery.php(88): PFFormPrinter->formHTML(string, boolean, boolean, integer, NULL, NULL, NULL, boolean, boolean)
#3 /../w/extensions/PageForms/specials/PF_RunQuery.php(28): PFRunQuery->printPage(string, boolean)
#4 /../w/includes/specialpage/SpecialPage.php(600): PFRunQuery->execute(string)
#5 /../w/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(string)
#6 /../w/includes/specialpage/SpecialPageFactory.php(693): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext, boolean, MediaWiki\Linker\LinkRenderer)
#7 /../w/includes/parser/Parser.php(3144): MediaWiki\SpecialPage\SpecialPageFactory->capturePath(Title, RequestContext, MediaWiki\Linker\LinkRenderer)
#8 /../w/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPFrame_Hash)
#9 /../w/includes/parser/Parser.php(2887): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#10 /../w/includes/parser/Parser.php(1556): Parser->replaceVariables(string)
#11 /../w/includes/parser/Parser.php(651): Parser->internalParse(string)
#12 /../w/includes/content/WikitextContent.php(374): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#13 /../w/includes/content/AbstractContent.php(590): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#14 /../w/extensions/SemanticMediaWiki/includes/ContentParser.php(161): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#15 /../w/extensions/SemanticMediaWiki/includes/ContentParser.php(128): SMW\ContentParser->fetchFromContent()
#16 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(197): SMW\ContentParser->parse()
#17 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
#18 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
#19 /../w/extensions/SemanticMediaWiki/src/SQLStore/Rebuilder/Rebuilder.php(239): SMW\MediaWiki\Jobs\UpdateJob->run()
#20 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(470): SMW\SQLStore\Rebuilder\Rebuilder->rebuild(integer)
#21 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(383): SMW\Maintenance\DataRebuilder->doUpdateById(integer)
#22 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(222): SMW\Maintenance\DataRebuilder->rebuildAll()
#23 /../w/extensions/SemanticMediaWiki/maintenance/rebuildData.php(198): SMW\Maintenance\DataRebuilder->rebuild()
#24 /../w/maintenance/doMaintenance.php(107): SMW\Maintenance\rebuildData->execute()
#25 /../w/extensions/SemanticMediaWiki/maintenance/rebuildData.php(294): require_once(string)
#26 {main}

Event Timeline

Is this still a problem with latest Page Forms code? I think it was fixed about a week ago.

Kghbln claimed this task.

Indeed, fixed in master. Thanks a lot!