I am currently trying your extension to setup a monoversion wikifarm within my MediaWiki 1.23 installation (this is a migration project, too...) on a CentOS 7 machine. (Using Git master version of your code...)
The wiki code lives in /var/www/html/wiki.ou.site.de/w
Following the docs I did:
- Install the extension in extensions folder and ran composer to install the yaml dep.
- Shuffled around the LocalSettings.php files
- Used the monoversion template for farms.yaml, put that in extensions/MediaWikiFarm/config, edited the server string to match my host.
- Added following to the LocalSettings.php: $wgMediaWikiFarmConfigDir = '/var/www/html/wiki.ou.site.de/w/extensions/MediaWikiFarm/config';
First nothing worked, until I added $wgMediaWikiFarmCacheDir = false;, which seems to be related to your last comment on https://www.mediawiki.org/wiki/User_talk:Seb35#MediaWikiFarm_on_MediaWiki-Vagrant.
After that, at least my main page was showing up, but no CSS, JS, etc was loaded. Looking into the Firefox Debugger I found many Error 500 statuses for these (pointing to load.php).
Looking inside /var/log/messages I found:
mediawikifarm: Logging parameter must be false or a string mediawikifarm: Only explicitly-defined wikis declared in existence lists are allowed in monoversion mode. mediawikifarm: Only explicitly-defined wikis declared in existence lists are allowed in monoversion mode. mediawikifarm: Only explicitly-defined wikis declared in existence lists are allowed in monoversion mode.
After setting $wgMediaWikiFarmSyslog = 'mediawikifarm'; inside LocalSettings.php, that error went away.
Looking up the other error lead my to [[ https://github.com/wikimedia/mediawiki-extensions-MediaWikiFarm/blob/e819db74970e444ecd3f2953fcf4a2870fc31a74/src/MediaWikiFarm.php#L1072 | Line 1072 of src/MediaWikiFarm.php ]]
Digging into the code, I wondered why $explicitExistance is not true and I think the reason is that with the default monoversion template for farms.yaml there is no hash variables given, which results in $explicitExistance = null ([[ https://github.com/wikimedia/mediawiki-extensions-MediaWikiFarm/blob/e819db74970e444ecd3f2953fcf4a2870fc31a74/src/MediaWikiFarm.php#L912 | Line 912 of src/MediaWikiFarm.php ]])
So: shall I fix my farms.yaml and fix the template, too (would create a merge request for this) or should the code be fixed for this case?
Thanks for your work and help,
To be fixed:
- Alternative declaration of wikis for small setups
- Improve discoverability of $wgMediaWikiFarmSyslog
- Fix example for monoversion case in /docs/config
- Do not execute MediaWiki if the wiki does not exist in monoversion cas