Page MenuHomePhabricator

Uncaught exception SuggestionGenerator.php: Item could not be found
Closed, DuplicatePublic

Description

2014-07-10 12:19:43 mw1194 wikidatawiki: [996ea05d] /w/api.php?action=wbsgetsuggestions&search=&entity=Q17334540&format=json&language=en&type=property&continue=0 Exception from line 55 of /usr/local/apache/common-local/php-1.24wmf12/extensions/Wikidata/extensions/PropertySuggester/src/PropertySuggester/SuggestionGenerator.php: Item Q17334540 could not be found
#0 /usr/local/apache/common-local/php-1.24wmf12/extensions/Wikidata/extensions/PropertySuggester/src/PropertySuggester/GetSuggestions.php(77): PropertySuggester\SuggestionGenerator->generateSuggestionsByItem('Q17334540', 7, 0.071)
#1 /usr/local/apache/common-local/php-1.24wmf12/includes/api/ApiMain.php(908): PropertySuggester\GetSuggestions->execute()
#2 /usr/local/apache/common-local/php-1.24wmf12/includes/api/ApiMain.php(363): ApiMain->executeAction()
#3 /usr/local/apache/common-local/php-1.24wmf12/includes/api/ApiMain.php(334): ApiMain->executeActionWithErrorHandling()
#4 /usr/local/apache/common-local/php-1.24wmf12/api.php(85): ApiMain->execute()
#5 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')

Details

Reference
bz67816

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:35 AM
bzimport set Reference to bz67816.
bzimport added a subscriber: Unknown Object (MLST).

I don't think item not found is really an exceptional situation, so think instead we could return an empty array and perhaps log it.

in SuggestionGenerator::generateSuggestionsByItem, we could log something to the debug log, e.g.:

wfDebugLog( CLASS, 'Item ' . $id . ' could not be found' );

still happening...

/w/api.php?action=wbsgetsuggestions&search=na&context=item&format=json&language=fr&type=property&continue=0&entity=Q17831325 Exception from line 57 of /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/PropertySuggester/src/PropertySuggester/SuggestionGenerator.php: Item Q17831325 could not be found

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).