Page MenuHomePhabricator

ContentTranslation API some queries fail (Call to getName() on a non-object in ApiQueryContentTranslation.php)
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error

Request ID: W49fSgpAIDoAALO5KX4AAADQ

message
[{exception_id}] {exception_url}   BadMethodCallException from line 158 of /srv/mediawiki/php-1.32.0-wmf.22/extensions/ContentTranslation/api/ApiQueryContentTranslation.php: Call to a member function getName() on a non-object (null)
stacktrace
#0 /srv/mediawiki/php-1.32.0-wmf.22/extensions/ContentTranslation/api/ApiQueryContentTranslation.php(64): ApiQueryContentTranslation->find(ContentTranslation\TranslationWork, ContentTranslation\Translator)
#1 /srv/mediawiki/php-1.32.0-wmf.22/extensions/ContentTranslation/api/ApiQueryContentTranslation.php(24): ApiQueryContentTranslation->run()
#2 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiQuery.php(249): ApiQueryContentTranslation->execute()
#3 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(1587): ApiQuery->execute()
#4 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(531): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.32.0-wmf.22/api.php(87): ApiMain->execute()

Source: https://github.com/wikimedia/mediawiki-extensions-ContentTranslation/blob/81bab7d7638ac821d307013bbe9ce867d3d1beb2/api/ApiQueryContentTranslation.php#L158

$user = $centralIdLookup->localUserFromCentralId( $globalUserId );
$user->getName(); # Error

Notes

Seen irregularly since 1.32.0-wmf.19, possibly earlier.

Example query that fails: https://he.wikipedia.org/w/api.php?action=query&format=json&list=contenttranslation&sourcetitle=Shirazeh%20Houshiary&from=en&to=he

Event Timeline

Krinkle renamed this task from ContentTranslation API fails to respond (BadMethodCallException) on some queries to ContentTranslation API some queries fail (Call to getName() on a non-object in ApiQueryContentTranslation.php).Nov 1 2018, 7:59 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM