Page MenuHomePhabricator

Beta: Argument 2 passed to Wikibase\Repo\Specials\SpecialEntitiesWithoutPageFactory::__construct() must be an instance of array, null given
Closed, ResolvedPublic3 Estimated Story Points

Description

On a repo with no entity types defined for some reason our list of empty entity types ends up being null instead of an array.

This goes against the phpdoc so should be fixed.

#0 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php(31): NO_FUNCTION_GIVEN()
#1 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php(35): Wikibase\Repo\Specials\SpecialEntitiesWithoutPageFactory::newFromGlobalState()
#2 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(393): Wikibase\Repo\Specials\SpecialEntitiesWithoutPageFactory::newSpecialEntitiesWithoutLabel()
#3 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(426): MediaWiki\Special\SpecialPageFactory->getPage(string)
#4 /srv/mediawiki/php-master/includes/specials/SpecialSpecialpages.php(56): MediaWiki\Special\SpecialPageFactory->getUsablePages(User)
#5 /srv/mediawiki/php-master/includes/specials/SpecialSpecialpages.php(44): SpecialSpecialpages->getPageGroups()
#6 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(569): SpecialSpecialpages->execute(NULL)
#7 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)
#8 /srv/mediawiki/php-master/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#9 /srv/mediawiki/php-master/includes/MediaWiki.php(862): MediaWiki->performRequest()
#10 /srv/mediawiki/php-master/includes/MediaWiki.php(517): MediaWiki->main()
#11 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#12 /srv/mediawiki/w/index.php(3): include(string)
#13 {main}

Reproduction https://commons.wikimedia.beta.wmflabs.org/wiki/Special:SpecialPages

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 30 2018, 11:45 AM
Addshore added a comment.EditedOct 30 2018, 11:59 AM

Related is also this stack

#0 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/WikibaseRepo.php(1339): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php(31): Wikibase\Repo\WikibaseRepo->getLocalEntityTypes()
#2 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php(35): Wikibase\Repo\Specials\SpecialEntitiesWithoutPageFactory::newFromGlobalState()
#3 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(393): Wikibase\Repo\Specials\SpecialEntitiesWithoutPageFactory::newSpecialEntitiesWithoutLabel()
#4 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(426): MediaWiki\Special\SpecialPageFactory->getPage(string)
#5 /srv/mediawiki/php-master/includes/specials/SpecialSpecialpages.php(56): MediaWiki\Special\SpecialPageFactory->getUsablePages(User)
#6 /srv/mediawiki/php-master/includes/specials/SpecialSpecialpages.php(44): SpecialSpecialpages->getPageGroups()
#7 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(569): SpecialSpecialpages->execute(NULL)
#8 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)
#9 /srv/mediawiki/php-master/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#10 /srv/mediawiki/php-master/includes/MediaWiki.php(862): MediaWiki->performRequest()
#11 /srv/mediawiki/php-master/includes/MediaWiki.php(517): MediaWiki->main()
#12 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#13 /srv/mediawiki/w/index.php(3): include(string)
#14 {main}

So if no repo is configured we hit the exceptional case.
The local repo definition should probably always exist...

Change 470582 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Define RepositoryDefinitions namespace array even with 0 namespaces

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

Change 470584 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Test for RepositoryDefinitions no entity handeling

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

Addshore moved this task from incoming to in progress on the Wikidata board.Oct 31 2018, 10:42 AM
Restricted Application added a project: User-Addshore. · View Herald TranscriptOct 31 2018, 11:05 AM
Addshore set the point value for this task to 3.Oct 31 2018, 11:05 AM

Change 470582 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Define RepositoryDefinitions namespace array even with 0 namespaces

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

Change 470584 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Test for RepositoryDefinitions no entity handeling

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

Addshore closed this task as Resolved.Nov 6 2018, 12:19 PM
Addshore triaged this task as Medium priority.