Page MenuHomePhabricator

Argument 6 passed to Flow\Model\WikiReference::__construct() must be an instance of Title, null given
Closed, ResolvedPublic

Description

PHP fatal error in /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Model/Reference.php line 126:
Argument 6 passed to Flow\Model\WikiReference::__construct() must be an instance of Title, null given, called in /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Model/Reference.php on line 163 and defined


Version: unspecified
Severity: major
URL: https://en.wikipedia.org/wiki/Special:WhatLinksHere/Wikipedia:Collaboration_of_the_week/Template:Past_cotw
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=65915

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:25 AM
bzimport set Reference to bz65802.

[2014-05-27 11:51:43] Catchable fatal error: Argument 6 passed to Flow\Model\WikiReference::construct() must be an instance of Title, null given, called in /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Model/Reference.php on line 163 and defined at /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Model/Reference.php on line 126
Server: mw1055
Method: GET
URL: http://en.wikipedia.org/wiki/Special:WhatLinksHere/Wikipedia:Collaboration_of_the_week/Template:Past_cotw
Backtrace:
#0 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Model/Reference.php(126): Flow\Model\WikiReference::
construct()
#1 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Model/Reference.php(163): Flow\Model\WikiReference->__construct(Object(Flow\Model\UUID), Object(Title), 'post', Object(Flow\Model\UUID), 'link', NULL)
#2 [internal function]: Flow\Model\WikiReference::fromStorageRow(Array, NULL)
#3 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Data/BasicObjectMapper.php(30): call_user_func(Array, Array, NULL)
#4 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Data/ObjectLocator.php(308): Flow\Data\BasicObjectMapper->fromStorageRow(Array)
#5 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Data/ObjectManager.php(128): Flow\Data\ObjectLocator->load(Array)
#6 [internal function]: Flow\Data\ObjectManager->load(Array)
#7 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Data/ObjectLocator.php(95): array_map(Array, Array)
#8 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Data/ObjectLocator.php(48): Flow\Data\ObjectLocator->findMulti(Array, Array)
#9 [internal function]: Flow\Data\ObjectLocator->find(Array)
#10 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Data/ManagerGroup.php(62): call_user_func_array(Array, Array)
#11 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Data/ManagerGroup.php(74): Flow\Data\ManagerGroup->call('find', Array)
#12 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/ReferenceClarifier.php(71): Flow\Data\ManagerGroup->find('WikiReference', Array)
#13 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/ReferenceClarifier.php(37): Flow\ReferenceClarifier->loadReferencesForPage(Object(Title))
#14 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/ReferenceClarifier.php(21): Flow\ReferenceClarifier->getWikiReferences(Object(Title), Object(Title))
#15 /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/Hooks.php(620): Flow\ReferenceClarifier->getWhatLinksHereProps(Object(stdClass), Object(Title), Object(Title))
#16 [internal function]: FlowHooks::onWhatLinksHereProps(Object(stdClass), Object(Title), Object(Title), Array)
#17 /usr/local/apache/common-local/php-1.24wmf5/includes/Hooks.php(206): call_user_func_array('FlowHooks::onWh...', Array)
#18 /usr/local/apache/common-local/php-1.24wmf5/includes/GlobalFunctions.php(4004): Hooks::run('WhatLinksHerePr...', Array, NULL)
#19 /usr/local/apache/common-local/php-1.24wmf5/includes/specials/SpecialWhatlinkshere.php(329): wfRunHooks('WhatLinksHerePr...', Array)
#20 /usr/local/apache/common-local/php-1.24wmf5/includes/specials/SpecialWhatlinkshere.php(272): SpecialWhatLinksHere->listItem(Object(stdClass), Object(Title), Object(Title))
#21 /usr/local/apache/common-local/php-1.24wmf5/includes/specials/SpecialWhatlinkshere.php(93): SpecialWhatLinksHere->showIndirectLinks(0, Object(Title), 50, 0, 0)
#22 /usr/local/apache/common-local/php-1.24wmf5/includes/specialpage/SpecialPage.php(379): SpecialWhatLinksHere->execute('Wikipedia:Colla...')
#23 /usr/local/apache/common-local/php-1.24wmf5/includes/specialpage/SpecialPageFactory.php(507): SpecialPage->run('Wikipedia:Colla...')
#24 /usr/local/apache/common-local/php-1.24wmf5/includes/Wiki.php(288): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#25 /usr/local/apache/common-local/php-1.24wmf5/includes/Wiki.php(599): MediaWiki->performRequest()
#26 /usr/local/apache/common-local/php-1.24wmf5/includes/Wiki.php(451): MediaWiki->main()
#27 /usr/local/apache/common-local/php-1.24wmf5/index.php(46): MediaWiki->run()
#28 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#29 {main}

This also happened when I updated ee-flow, I think in "Populating links tables..."

...
Processing post rhbccntpjqbflkhm
Processing post rhbm9aiukmrsi5tm
PHP Catchable fatal error: Argument 6 passed to Flow\Model\WikiReference::__construct() must be an instance of Title, null given, called in /srv/mediawiki/extensions/Flow/includes/Model/Reference.php on line 163 and defined in /srv/mediawiki/extensions/Flow/includes/Model/Reference.php on line 126
Processing post rhbma4fer0sbzyt6
...

If I visit post rhbm9aiukmrsi5tm by visiting http://ee-flow.wmflabs.org/wiki/Special:Flow/post/rhbm9aiukmrsi5tm , I'm shown http://ee-flow.wmflabs.org/w/index.php?title=Flow_QA&workflow=rhbm9aipw9guhloa#flow-post-rhbm9aiukmrsi5tm , note this title Flow_QA is a regular wiki page, not a Flow board like its associated Talk:Flow_QA board. But this mis-identified board also happens for the next post ID, rhbma4fer0sbzyt6. So that might be an unrelated glitch.

Bug 65915 is a different bug (an interwiki exception) that also arises in Flow's handling of the WhatLinksHereProps hook.

Change 135572 had a related patch set uploaded by Bsitu:
Don't be too strict when resolving the DB data

https://gerrit.wikimedia.org/r/135572

I've looked into the data, and it seems that this error is a result of loading references from other wikis with namespaces that don't exist on the viewing wiki.

I did this by dumping the flow_wiki_ref table from flowdb, and then running the following on each line of the output.

list( $ns, $title ) = preg_split( '/(?<=\d)\s+/', trim($ref), 2 ); $titleObj = Title::makeTitleSafe( $ns, $title ); if ( ! $titleObj ) { var_dump( compact( array( 'ns', 'title', 'ref' ) ) ); }

The output was fine on mediawikiwiki but on enwiki I got the following errors:

array(3) {

["ns"]=>
string(3) "102"
["title"]=>
string(11) "ConfirmEdit"
["ref"]=>
string(16) "102	ConfirmEdit

"
}
array(3) {

["ns"]=>
string(3) "102"
["title"]=>
string(9) "Flow/Spam"
["ref"]=>
string(14) "102	Flow/Spam

"
}
array(3) {

["ns"]=>
string(3) "102"
["title"]=>
string(9) "Translate"
["ref"]=>
string(14) "102	Translate

"
}

  • This bug has been marked as a duplicate of bug 65915 ***

Change 136280 had a related patch set uploaded by Werdna:
Segregate Reference objects by source wiki.

https://gerrit.wikimedia.org/r/136280

  • This bug has been marked as a duplicate of bug 65915 ***

Change 135572 merged by jenkins-bot:
Don't be too strict when resolving the DB data

https://gerrit.wikimedia.org/r/135572

Change 136934 had a related patch set uploaded by Spage:
Don't be too strict when resolving the DB data

https://gerrit.wikimedia.org/r/136934

Change 136934 merged by jenkins-bot:
Don't be too strict when resolving the DB data

https://gerrit.wikimedia.org/r/136934

Change 136935 had a related patch set uploaded by Spage:
Don't be too strict when resolving the DB data

https://gerrit.wikimedia.org/r/136935

Change 136935 merged by jenkins-bot:
Don't be too strict when resolving the DB data

https://gerrit.wikimedia.org/r/136935

Change 136280 had a related patch set uploaded (by Mattflaschen):
Segregate Reference objects by source wiki.

https://gerrit.wikimedia.org/r/136280

This is also happening on Beta (that request is with no-JS, but it also happens with JS):

2015-08-10 17:25:43 deployment-mediawiki01 enwiki fatal ERROR: [03077139] /w/index.php?title=Talk:Flow&action=edit-header   ErrorException from line 35 of /srv/mediawiki/php-master/extensions/Flow/includes/Model/WikiReference.php: PHP Error: Argument 6 passed to Flow\Model\WikiReference::__construct() must be an instance of Title, null given {"exception":"[Exception ErrorException] (/srv/mediawiki/php-master/extensions/Flow/includes/Model/WikiReference.php:35) PHP Error: Argument 6 passed to Flow\\Model\\WikiReference::__construct() must be an instance of Title, null given\n[stacktrace]\n#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer)\n#1 {main}\n"}

We really need to get https://gerrit.wikimedia.org/r/#/c/136280/ reviewed by the DBAs.

Reedy renamed this task from Argument 6 passed to Flow\Model\WikiReference::__construct() must be an instance of Title, null given, called in /usr/local/apache/common-local/php-1.24wmf5/extensions/Flow/includes/Model/Reference.php on line 163 to Argument 6 passed to Flow\Model\WikiReference::__construct() must be an instance of Title, null given.Aug 14 2015, 11:34 AM
Reedy set Security to None.

Change 136280 merged by jenkins-bot:
Segregate Reference objects by source wiki.

https://gerrit.wikimedia.org/r/136280