For a long time Wikibase has been a bit of a "special" extension, as it really contains 2 other extensions (or 3 or more at times) and none of these extensions follow the standard practices for extensions.
Namely
- Be loadable via wfLoadExtension( 'EXTENSIONNAME' )
- Have default configuration that works out of the box
This ends up being confusing for anyone that works on or around or uses Wikibase, and results in overheads for standard systems such as Wikimedia extension CI which needs special cases for Wikibase, and an confusing entry point at Wikibase.php link
Currently the documented way for loading Wikibase is:
wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" ); require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php"; wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" ); require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
This task has goals of:
- Provide a default experience that would be loaded with wfLoadExtension( 'Wikibase' ), likely with both repo and client loaded
- Continue to allow the individual extensions to be loaded in their current way, maintaining back compatibility.
- Load sensible defaults for Wikibase in all of these situations. (Probably the things in the relevant ExampleSettings files)
Acceptance Criteria: 🏕️🌟(September 2021)
- Users of Wikibase can load the extension (Repo & Client) using a single call to wfLoadExtension( 'Wikibase' )
- Existing extension entry points can still be used and do not change behaviour
OLD 2015 ticket description
Copy some of the reasonable assumptions from repo/config/Wikibase.example.php to repo/config/Wikibase.default.php, and also for the client settings. For example, $wgWBRepoSettings["entityNamespaces"] should default to the registered WB_NS_ITEM namespace and so on...
Fix any code that will not run without customized configuration.
Also, as suggested in the TODO at the end of Wikibase.php, the default mode should be to require both the repo and client entry points. It's not nice that the traditional incantation throws a fatal "Incomplete configuration" error,
require_once "$IP/extensions/Wikibase/Wikibase.php";