Page MenuHomePhabricator

Implement a way to view (extension) configuration options and its value on-wiki
Open, Needs TriagePublic

Description

This is a more general task and could be interpreted widely, but what it should track is, in fact, the work to allow to view extension configuration options on-wiki. I create this task as a result of a dicsussion of @Legoktm and me at the Wikimedia-Developer-Summit (2017) about these changes:
https://gerrit.wikimedia.org/r/#/c/327314/
https://gerrit.wikimedia.org/r/#/c/327313/
https://gerrit.wikimedia.org/r/#/c/327312/

This task should track the effort to achieve this.

Event Timeline

Florian created this task.Jan 12 2017, 6:53 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 12 2017, 6:53 AM
Florian removed Florian as the assignee of this task.Jan 12 2017, 7:11 AM
Florian added a comment.EditedFeb 19 2017, 8:22 PM

Example of https://gerrit.wikimedia.org/r/#/c/327314/

The "Expand" values contains a string representation of an Array, which will be wrapped as a colapsible div by default (as the array values can be a bit bigger).

Ricordisamoa renamed this task from Implement a way to view (extension) configuration options and it's value on-wiki to Implement a way to view (extension) configuration options and its value on-wiki.Mar 6 2017, 1:11 AM
Osnard added a subscriber: Osnard.Sep 12 2017, 8:29 AM

Is this something Extension:Configure should be build upon? The extension page tells that it is not compatible with MW1.29. Does anybody know whether the author already works on this?

I'm not completely sure you mean this, but I really think this shouldn't be part of Configure, but a core feature. Configure seems quite dangerous to me and i doubt it will ever be installed on major wikis.

I don't mean that this should be implemented in Extension:Configure, but the other way round. Having a detailed description of particular configuration options (like a description, data type, possible values, ...) is the first step to build a user interface that provides proper input fields (e.g. a "Namespace-Selector") to modify them. At the moment Extension:Configure does exact that. Unfortunately it is broken with MW 1.29 and I believe, that if someone is going to change that, the new/next version of Extension:Configure should probably use the available information from the extension registry. Ideally an extension should be allowed to provide a custom input type. A mapping between input type and configuration would be needed though

"NamespaceBlacklist": {
    "type": "namespacelist", //By this a UI could load e.g "MediaWiki\Html\Form\Field\NamespaceList"
    "value": [ 0 ]
    }
}

Still, I think such a special page should be readonly, no matter what. You shouldn't be able to change fundamental wiki settings on a special page. However, I think we agree that it's a good idea to build a read-only special page like Special:Version/Configuration and allow extensions (like Configure) to modify its behavior to add a write functionality.

To be honest: My vision is, that there's an on-wiki way to configure MediaWiki ("configure" -> change configuration options), like a special page providing that functionality (where extension and core settings can be viewed and changed by recognized groups (read: groups with a special permission).

However, I see the potential problems of exposing such a way, there could be security problems (which I'm sure we can prevent) or problems when the user changes something which results in the whole wiki to be down (there's no easy revert functionality anymore, as you did the change on-wiki, which is not working anymore. In a file-based config you simply change it back or revert the backup, which is pretty easy, as you're already logged in to the server and have access to the filesystem. For changes made via the UI you need to do a lot more things to do to revert your changes).

Because of these problems my vision includes only non-critical configurations, e.g. no database-specific configurations (that shouldn't be saved anywhere, except LocalSettings.php). Other things, like extension conifguration settings or group permissions or something like that can (and should, in my opinion) be changeable easily on a web-based interface. Because this would be a really-really big change in MediaWiki, my first step was to provide a way to _view_ (and view only) settings on-wiki. That allows us to implement the basics for the bigger vision and let's us easily see, how it works and where we can proceed.

This task, as I said, is only for a core functionality to view (selected) configurations, which are explicitly marked to be visible on-wiki, protected by a special user-right :)

This comment was removed by Aklapper.
Tgr added a subscriber: Tgr.Apr 22 2018, 8:24 AM

This would be very useful for T197588. It would make a lot of sense for Wikibase Quality Constraints in particular.

We could separate the core config (provided by mediawiki itself) and the user-provided custom Qids and Pids, that would be stored externally.