Page MenuHomePhabricator

The calling convention to LinksUpdate::__construct() has changed
Closed, ResolvedPublic

Description

2013-06-19 19:11:24 mw1143 commonswiki: [cbc971c3] /w/api.php Exception from line 63 of /usr/local/apache/common-local/php-1.22wmf7/includes/LinksUpdate.php: The calling convention to LinksUpdate::__construct() has changed. Please see WikiPage::doEditUpdates() for an invocation example.

#0 /usr/local/apache/common-local/php-1.22wmf7/extensions/GeoData/GeoDataHooks.php(226): LinksUpdate->__construct(Object(Title), false)
#1 [internal function]: GeoDataHooks::onFileUpload(Object(LocalFile), false, true)
#2 /usr/local/apache/common-local/php-1.22wmf7/includes/Hooks.php(196): call_user_func_array('GeoDataHooks::o...', Array)
#3 /usr/local/apache/common-local/php-1.22wmf7/includes/GlobalFunctions.php(3834): Hooks::run('FileUpload', Array)
#4 /usr/local/apache/common-local/php-1.22wmf7/includes/filerepo/file/LocalFile.php(1369): wfRunHooks('FileUpload', Array)
#5 /usr/local/apache/common-local/php-1.22wmf7/includes/filerepo/file/LocalFile.php(1104): LocalFile->recordUpload2('', 'User created pa...', '=={{int:filedes...', Array, false, Object(User))
#6 /usr/local/apache/common-local/php-1.22wmf7/includes/upload/UploadBase.php(687): LocalFile->upload('/tmp/localcopy_...', 'User created pa...', '=={{int:filedes...', 1, Array, false, Object(User))
#7 /usr/local/apache/common-local/php-1.22wmf7/includes/upload/UploadFromStash.php(182): UploadBase->performUpload('User created pa...', '=={{int:filedes...', false, Object(User))
#8 /usr/local/apache/common-local/php-1.22wmf7/includes/api/ApiUpload.php(615): UploadFromStash->performUpload('User created pa...', '=={{int:filedes...', false, Object(User))
#9 /usr/local/apache/common-local/php-1.22wmf7/includes/api/ApiUpload.php(138): ApiUpload->performUpload(Array)
#10 /usr/local/apache/common-local/php-1.22wmf7/includes/api/ApiUpload.php(109): ApiUpload->getContextResult()
#11 /usr/local/apache/common-local/php-1.22wmf7/includes/api/ApiMain.php(840): ApiUpload->execute()
#12 /usr/local/apache/common-local/php-1.22wmf7/includes/api/ApiMain.php(380): ApiMain->executeAction()
#13 /usr/local/apache/common-local/php-1.22wmf7/includes/api/ApiMain.php(351): ApiMain->executeActionWithErrorHandling()
#14 /usr/local/apache/common-local/php-1.22wmf7/api.php(73): ApiMain->execute()
#15 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#16 {main}


Version: unspecified
Severity: normal

Details

Reference
bz49842

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:09 AM
bzimport added a project: GeoData.
bzimport set Reference to bz49842.

This is caused by our old friend PoolCounter returning null, I could add a check to GD to make the exception message more relevant, but the cause lies outside.

Still occuring...

2013-09-16 19:03:11 mw1098 commonswiki: [e872ec0f] /wiki/Special:Upload Exception from line 63 of /usr/local/apache/common-local/php-1.22wmf17/includes/LinksUpdate.php: The calling convention to LinksUpdate::__construct() has changed. Please see WikiPage::doEditUpdates() for an invocation example.

#0 /usr/local/apache/common-local/php-1.22wmf17/extensions/GeoData/GeoDataHooks.php(226): LinksUpdate->__construct(Object(Title), false)
#1 [internal function]: GeoDataHooks::onFileUpload(Object(LocalFile), false, true)
#2 /usr/local/apache/common-local/php-1.22wmf17/includes/Hooks.php(199): call_user_func_array('GeoDataHooks::o...', Array)
#3 /usr/local/apache/common-local/php-1.22wmf17/includes/GlobalFunctions.php(3877): Hooks::run('FileUpload', Array)
#4 /usr/local/apache/common-local/php-1.22wmf17/includes/filerepo/file/LocalFile.php(1385): wfRunHooks('FileUpload', Array)
#5 /usr/local/apache/common-local/php-1.22wmf17/includes/filerepo/file/LocalFile.php(1111): LocalFile->recordUpload2('', '{{Information?|...', '== {{int:filede...', Array, false, Object(User))
#6 /usr/local/apache/common-local/php-1.22wmf17/includes/upload/UploadBase.php(687): LocalFile->upload('/tmp/phpHudxm6', '{{Information?|...', '== {{int:filede...', 1, Array, false, Object(User))
#7 /usr/local/apache/common-local/php-1.22wmf17/includes/specials/SpecialUpload.php(437): UploadBase->performUpload('{{Information?|...', '== {{int:filede...', true, Object(User))
#8 /usr/local/apache/common-local/php-1.22wmf17/includes/specials/SpecialUpload.php(172): SpecialUpload->processUpload()
#9 /usr/local/apache/common-local/php-1.22wmf17/includes/SpecialPage.php(631): SpecialUpload->execute(NULL)
#10 /usr/local/apache/common-local/php-1.22wmf17/includes/SpecialPageFactory.php(489): SpecialPage->run(NULL)
#11 /usr/local/apache/common-local/php-1.22wmf17/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#12 /usr/local/apache/common-local/php-1.22wmf17/includes/Wiki.php(590): MediaWiki->performRequest()
#13 /usr/local/apache/common-local/php-1.22wmf17/includes/Wiki.php(459): MediaWiki->main()
#14 /usr/local/apache/common-local/php-1.22wmf17/index.php(55): MediaWiki->run()
#15 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#16 {main}

Can we just escape? Or is it some sort of race condition with a slave?

public static function onFileUpload( LocalFile $file ) {

		$title = $file->getTitle();
		$wp = WikiPage::factory( $title );
		$po = new ParserOptions();
		$pout = $wp->getParserOutput( $po );
		if ( !( $title instanceof Title ) || !( $po instanceof ParserOutput ) ) {
			return true;
		}
		$lu = new LinksUpdate( $file->getTitle(), $pout );
		self::onLinksUpdate( $lu );
		return true;

}

Change 86724 had a related patch set uploaded by MaxSem:
Fix exception on null parser output

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

Change 86724 merged by jenkins-bot:
Fix exception on null parser output

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