Page MenuHomePhabricator

Multiwiki settings are not loaded correctly
Closed, InvalidPublic

Description

I'm running https://gerrit.wikimedia.org/r/#/c/207739/ from the /vagrant/mediawiki-fr directory, as follows:

MW_INSTALL_PATH=/vagrant/mediawiki-fr php extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php --globals

The globals dump has $wgDonationInterfaceOrphanCron => (null?), which is strange because the variable is defined in two places, settings.d/wikis/paymentswiki/settings.d/puppet-managed/10-DonationInterface.php where it is set to an array of real values, and extensions/DonationInterface/DonationInterface.php where it is set to an array of default values. How would it end up with no value when running from a maintenance script?

Event Timeline

awight raised the priority of this task from to Needs Triage.
awight updated the task description. (Show Details)
awight added subscribers: awight, bd808, mmodell.

You need to use the mwscript wrapper script to get the MultiWiki configuration to load. Something like this should work:

MW_INSTALL_PATH=/vagrant/mediawiki-fr mwscript extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php --wiki payments --globals

The env setting might not pass through mwscript correctly however. The most direct command would be:

sudo -u www-data -n -- /usr/bin/env MW_INSTALL_PATH=/vagrant/mediawiki-fr php5 /var/www/w/MWScript.php extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php --wiki payments --globals

bd808 claimed this task.

Thanks for the explanation, this worked for me!

Thanks for the explanation, this worked for me!

Restricted Application added a subscriber: StudiesWorld. · View Herald Transcript