Page MenuHomePhabricator

Code sample for extension.json is wrong
Closed, InvalidPublic

Description

This was changed in 2017 (https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/EventLogging/+/378200/) but as far as I can tell the format introduced in that change doesn't seem to work. However, the original way of just specifying "EventLoggingSchemas" directly in the top level of extension.json does work. Maybe @Krinkle or @Legoktm can advise.

Event Timeline

Milimetric triaged this task as Medium priority.Jan 9 2019, 1:47 PM
Milimetric created this task.

Change 483130 had a related patch set uploaded (by Milimetric; owner: Milimetric):
[mediawiki/extensions/EventLogging@master] Correct code sample for extension.json

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

It's correct, as long as your extension is using manifest_version: 2 (https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#manifest_version). This is explained in the commit message of the linked change ("Update documentation for extension.json manifest_version 2") and in the code itself "Example using extension.json (manifest_version 2)".

Change 483130 abandoned by Milimetric:
Correct code sample for extension.json

Reason:
Abandoning as per Lego's comment here: https://phabricator.wikimedia.org/T213285#4867072. Basically you need to specify in your extension.json that you're using manifest_version: 2. This may be why people are confused, because most examples like NavigationTiming and EventLogging don't use manifest_version: 2. Probably this will improve with time.

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