Page MenuHomePhabricator

Argument 1 passed to Wikibase\HistoryEntityAction::__construct() must be an instance of Article, WikiPage given in /srv/mediawiki/php-1.31.0-wmf.8/extensions/Wikidata/extensions/Wikibase/repo/includes/Content/ItemHandler.php on line 118
Closed, ResolvedPublic

Description

While trying to view history pages when testing mwf.8 of the Wikidata build extension on mwdebug1002.

Example: https://test.wikidata.org/w/index.php?title=Q37279&action=history

[{exception_id}] {exception_url} ErrorException from line 118 of /srv/mediawiki/php-1.31.0-wmf.8/extensions/Wikidata/extensions/Wikibase/repo/includes/Content/ItemHandler.php: PHP Error: Argument 1 passed to Wikibase\HistoryEntityAction::__construct() m

Catchable fatal error: Argument 1 passed to Wikibase\HistoryEntityAction::__construct() must be an instance of Article, WikiPage given in /srv/mediawiki/php-1.31.0-wmf.8/extensions/Wikidata/extensions/Wikibase/repo/includes/Content/ItemHandler.php on line
#0 /srv/mediawiki/php-1.31.0-wmf.8/extensions/Wikidata/extensions/Wikibase/repo/includes/Actions/HistoryEntityAction.php(46): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.31.0-wmf.8/extensions/Wikidata/extensions/Wikibase/repo/includes/Content/ItemHandler.php(118): Wikibase\HistoryEntityAction->__construct(WikiPage, RequestContext, Wikibase\Repo\Content\EntityContentFactory, Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup)
#2 /srv/mediawiki/php-1.31.0-wmf.8/includes/actions/Action.php(107): Closure$Wikibase\Repo\Content\ItemHandler::getActionOverrides(WikiPage, RequestContext)
#3 /srv/mediawiki/php-1.31.0-wmf.8/includes/actions/Action.php(154): Action::factory(string, WikiPage, RequestContext)
#4 /srv/mediawiki/php-1.31.0-wmf.8/includes/MediaWiki.php(155): Action::getActionName(RequestContext)
#5 /srv/mediawiki/php-1.31.0-wmf.8/includes/MediaWiki.php(768): MediaWiki->getAction()
#6 /srv/mediawiki/php-1.31.0-wmf.8/includes/MediaWiki.php(523): MediaWiki->main()
#7 /srv/mediawiki/php-1.31.0-wmf.8/index.php(43): MediaWiki->run()
#8 /srv/mediawiki/w/index.php(3): include(string)
#9 {main}

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : wmf/1.31.0-wmf.8Action override callbacks must still accept WikiPage for now.
mediawiki/extensions/Wikibase : masterAction override callbacks must still accept WikiPage for now.

Event Timeline

Addshore created this task.Nov 15 2017, 3:25 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 15 2017, 3:25 PM
Addshore updated the task description. (Show Details)Nov 15 2017, 3:28 PM

Reproducible on beta

Hm, perhaps not, AFAICT it will just move the type error a bit.

Addshore triaged this task as High priority.Nov 15 2017, 3:54 PM
Addshore assigned this task to daniel.Nov 15 2017, 4:10 PM

Core’s Action::getActionName calls the factory function with a WikiPage, apparently:

$action = self::factory( $actionName, $context->getWikiPage(), $context );

Change 391577 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/extensions/Wikibase@master] Action override callbacks must still accept WikiPage for now.

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

Change 391588 had a related patch set uploaded (by Addshore; owner: Daniel Kinzler):
[mediawiki/extensions/Wikibase@wmf/1.31.0-wmf.8] Action override callbacks must still accept WikiPage for now.

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

Change 391577 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Action override callbacks must still accept WikiPage for now.

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

Addshore closed this task as Resolved.Nov 15 2017, 7:05 PM

Change 391588 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.31.0-wmf.8] Action override callbacks must still accept WikiPage for now.

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

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM