Page MenuHomePhabricator

Wikibase RepoHooks::onApiCheckCanExecute dies (via EntityHandler::getEntityNamespaces's assert) for all edits on wikis where Item isn't enabled?
Closed, ResolvedPublic

Description

Try to edit a File page with an API editor, like VE, or mobile, and the edit fails with a PHP fatal.

This is because RepoHooks::onApiCheckCanExecute calls EntityHandler::getEntityNamespaces to work out what namespaces to care about, and the latter doesn't check for enabled-ness.

Event Timeline

Jdforrester-WMF triaged this task as Unbreak Now! priority.
Restricted Application added subscribers: Liuxinyu970226, TerraCodes, Aklapper. · View Herald TranscriptJan 8 2019, 11:19 PM

Logstash AWgvwoVwzpjgITg6nyED.

Change 483030 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] RepoHooks::onApiCheckCanExecute only check enabled entity types

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

Change 483030 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] RepoHooks::onApiCheckCanExecute only check enabled entity types

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

Change 483041 had a related patch set uploaded (by Jforrester; owner: Addshore):
[mediawiki/extensions/Wikibase@wmf/1.33.0-wmf.12] RepoHooks::onApiCheckCanExecute only check enabled entity types

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

Change 483041 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.33.0-wmf.12] RepoHooks::onApiCheckCanExecute only check enabled entity types

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

Mentioned in SAL (#wikimedia-operations) [2019-01-09T01:15:24Z] <jforrester@deploy1001> Synchronized php-1.33.0-wmf.12/extensions/Wikibase/repo/RepoHooks.php: T213227 Don't have onApiCheckCanExecute die for inactive entity types (duration: 00m 53s)

Restricted Application added a project: User-Addshore. · View Herald TranscriptJan 9 2019, 1:16 AM

OK, this is no longer fataling, but it's erroring with wikibase-no-direct-editing instead. Needs a slot check, I guess. Leaving UBN as it's the last blocker to release.

Change 483049 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Wikibase@master] RepoHooks::onApiCheckCanExecute: Only fail if the edit is for our entity's slot

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

Change 483049 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] RepoHooks::onApiCheckCanExecute: Only fail if the edit is for our entity's slot

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

Change 483146 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Wikibase@wmf/1.33.0-wmf.12] RepoHooks::onApiCheckCanExecute: Only fail if the edit is for our entity's slot

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

Change 483146 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.33.0-wmf.12] RepoHooks::onApiCheckCanExecute: Only fail if the edit is for our entity's slot

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

Mentioned in SAL (#wikimedia-operations) [2019-01-09T16:11:26Z] <jforrester@deploy1001> Synchronized php-1.33.0-wmf.12/extensions/Wikibase/repo/RepoHooks.php: T213227 RepoHooks::onApiCheckCanExecute: Only fail if the edit is for our entity's slot (duration: 00m 54s)

Jdforrester-WMF closed this task as Resolved.

Fixed.

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