Page MenuHomePhabricator

Looking at pageinfo on mediainfo file with no entity created yet causes exception
Closed, ResolvedPublic

Description

Locally: http://default.web.mw.localhost:8080/mediawiki/index.php?title=File:Bluesq.png&action=info

[9ed61d6af314282d730a89eb] /mediawiki/index.php?title=File:Bluesq.png&action=info TypeError from line 66 of /var/www/mediawiki/extensions/Wikibase/repo/includes/Store/Sql/SqlSubscriptionLookup.php: Argument 1 passed to Wikibase\Store\Sql\SqlSubscriptionLookup::getSubscribers() must be an instance of Wikibase\DataModel\Entity\EntityId, null given, called in /var/www/mediawiki/extensions/Wikibase/repo/includes/Hooks/InfoActionHookHandler.php on line 89

Backtrace:

#0 /var/www/mediawiki/extensions/Wikibase/repo/includes/Hooks/InfoActionHookHandler.php(89): Wikibase\Store\Sql\SqlSubscriptionLookup->getSubscribers(NULL)
#1 /var/www/mediawiki/extensions/Wikibase/repo/includes/Hooks/InfoActionHookHandler.php(71): Wikibase\Repo\Hooks\InfoActionHookHandler->getPageInfoRow(Title)
#2 /var/www/mediawiki/extensions/Wikibase/repo/RepoHooks.php(995): Wikibase\Repo\Hooks\InfoActionHookHandler->handle(RequestContext, array)
#3 /var/www/mediawiki/includes/Hooks.php(174): Wikibase\RepoHooks::onInfoAction(RequestContext, array)
#4 /var/www/mediawiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#5 /var/www/mediawiki/includes/actions/InfoAction.php(123): Hooks::run(string, array)
#6 /var/www/mediawiki/includes/actions/FormlessAction.php(43): InfoAction->onView()
#7 /var/www/mediawiki/includes/MediaWiki.php(501): FormlessAction->show()
#8 /var/www/mediawiki/includes/MediaWiki.php(294): MediaWiki->performAction(ImagePage, Title)
#9 /var/www/mediawiki/includes/MediaWiki.php(868): MediaWiki->performRequest()
#10 /var/www/mediawiki/includes/MediaWiki.php(525): MediaWiki->main()
#11 /var/www/mediawiki/index.php(42): MediaWiki->run()
#12 {main}

Event Timeline

Addshore created this task.Oct 1 2018, 9:14 AM
Restricted Application added a project: User-Addshore. · View Herald TranscriptOct 1 2018, 9:14 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore moved this task from incoming to in progress on the Wikidata board.Oct 1 2018, 9:14 AM
Addshore moved this task from Unsorted 💣 to Active 🚁 on the User-Addshore board.
Addshore moved this task from Incoming to In Progress on the Wikidata-Campsite board.

Change 463716 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] All InfoActionHookHandler to handle pages with no entity

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

Addshore triaged this task as Medium priority.Oct 1 2018, 9:17 AM

The behaviour introduced in the patch will display as follows for pages where entities have non yet been created:

Change 463716 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Allow InfoActionHookHandler to handle pages with no entity

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

greg added a project: Multimedia.Mar 7 2019, 10:59 PM