Page MenuHomePhabricator

Entity search broken on Beta Wikidata: Call to undefined method Wikibase\\Repo\\WikibaseRepo::getEntityTypeToRepositoryMapping()
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

{
    "error": {
        "code": "internal_api_error_Error",
        "info": "[ZLCFtCSKmk9zdmyCFH4bFQAAABc] Exception caught: Call to undefined method Wikibase\\Repo\\WikibaseRepo::getEntityTypeToRepositoryMapping()",
        "errorclass": "Error",
        "*": "Error at /srv/mediawiki/php-master/extensions/WikibaseCirrusSearch/WikibaseSearch.entitytypes.php(37)\nfrom /srv/mediawiki/php-master/extensions/WikibaseCirrusSearch/WikibaseSearch.entitytypes.php(37)\n#0 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/TypeDispatchingEntitySearchHelper.php(43): Wikibase\\Search\\Elastic\\Hooks::{closure}(WebRequest)\n#1 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/ConceptUriSearchHelper.php(43): Wikibase\\Repo\\Api\\TypeDispatchingEntitySearchHelper->getRankedSearchResults(string, string, string, integer, boolean, NULL)\n#2 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(154): Wikibase\\Repo\\Api\\ConceptUriSearchHelper->getRankedSearchResults(string, string, string, integer, boolean, NULL)\n#3 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(280): Wikibase\\Repo\\Api\\SearchEntities->getSearchEntries(array)\n#4 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(262): Wikibase\\Repo\\Api\\SearchEntities->executeInternal()\n#5 /srv/mediawiki/php-master/includes/api/ApiMain.php(1915): Wikibase\\Repo\\Api\\SearchEntities->execute()\n#6 /srv/mediawiki/php-master/includes/api/ApiMain.php(892): ApiMain->executeAction()\n#7 /srv/mediawiki/php-master/includes/api/ApiMain.php(863): ApiMain->executeActionWithErrorHandling()\n#8 /srv/mediawiki/php-master/api.php(95): ApiMain->execute()\n#9 /srv/mediawiki/php-master/api.php(48): wfApiMain()\n#10 /srv/mediawiki/w/api.php(3): require(string)\n#11 {main}"
    },
    "servedby": "deployment-mediawiki11"
}

Message:

Error at /srv/mediawiki/php-master/extensions/WikibaseCirrusSearch/WikibaseSearch.entitytypes.php(37)
from /srv/mediawiki/php-master/extensions/WikibaseCirrusSearch/WikibaseSearch.entitytypes.php(37)
#0 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/TypeDispatchingEntitySearchHelper.php(43): Wikibase\Search\Elastic\Hooks::{closure}(WebRequest)
#1 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/ConceptUriSearchHelper.php(43): Wikibase\Repo\Api\TypeDispatchingEntitySearchHelper->getRankedSearchResults(string, string, string, integer, boolean, NULL)
#2 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(154): Wikibase\Repo\Api\ConceptUriSearchHelper->getRankedSearchResults(string, string, string, integer, boolean, NULL)
#3 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(280): Wikibase\Repo\Api\SearchEntities->getSearchEntries(array)
#4 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/SearchEntities.php(262): Wikibase\Repo\Api\SearchEntities->executeInternal()
#5 /srv/mediawiki/php-master/includes/api/ApiMain.php(1915): Wikibase\Repo\Api\SearchEntities->execute()
#6 /srv/mediawiki/php-master/includes/api/ApiMain.php(892): ApiMain->executeAction()
#7 /srv/mediawiki/php-master/includes/api/ApiMain.php(863): ApiMain->executeActionWithErrorHandling()
#8 /srv/mediawiki/php-master/api.php(95): ApiMain->execute()
#9 /srv/mediawiki/php-master/api.php(48): wfApiMain()
#10 /srv/mediawiki/w/api.php(3): require(string)
#11 {main}

What should have happened instead?:
Successful search.

Event Timeline

Change 938028 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

Change 938028 merged by jenkins-bot:

[mediawiki/extensions/WikibaseCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

Still broken if &type=lexeme is added (URL), because (as confirmed by codesearch) there’s another reference to the mapping in WikibaseLexemeCirrusSearch.

Change 938225 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

Change 938225 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

LucasWerkmeister claimed this task.

Seems to be fixed now.