Installed software:
Server: Ubuntu 18.04
Mediawiki: 1.31.2
PHP: 7.2
sabre/dav: 3.2.0
After installing the extension like described on github (https://github.com/wikimedia/mediawiki-extensions-WebDAV) and calling "https://<wiki-domain>/<scriptPath>/webdav.php" in browser.
The catch block in webdav.php throws an error.
ConfigException: No registered builder available for wg.
This happens because the config vars in extension.json are not registerd properly. The following lines need to be added to the extension.json (note the change from 'wg' to 'webdav'). (See: https://www.mediawiki.org/wiki/Manual:Configuration_for_developers)
"ConfigRegistry": { "webdav": "GlobalVarConfig::newInstance" },
As an effect of renaming 'wg' to 'webdav' all occurances need to be refactored:
$config = \MediaWiki\MediaWikiServices::getInstance() ->getConfigFactory()->makeConfig( 'wg' );
to
$config = \MediaWiki\MediaWikiServices::getInstance() ->getConfigFactory()->makeConfig( 'webdav' );
The following files need to be refactored:
- includes/Locks/Backend/WebDAVMediaWikiDBLockBackend.php
- includes/WebDAVNamespacesCollection.php
- includes/WebDAVPagesCollection.php
- includes/WebDAVFilesCollection.php
- includes/WebDAVFileFile.php
- webdav.php