proga:LMW - Managing

From Lojban
Jump to navigation Jump to search

Managing LMW

If you are in charge of LMW you should do the following:

  1. Open LMW once in a while to see if there are new requests from users for being registered. ConfirmAccount extension might be installed requiring every new user to fill in a short bio about them. So you have to manually let users in. Don't disable this feature otherwise spambots or vandals might come in. Don't use captcha as it has been cracked by vicarious.com.
  2. Update LMW once in a while by running in the root of LMW folder
    cd extensions
    and then:
    cd .. ; git checkout master ; git pull ; cd extensions
    and
    php ../maintenance/update.php
    to update all mysql tables.
    In case of fresh install run
    cd .. ; git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git ; cd extensions
    and then
    chgrp -R apache /home/gleki/public_html/mediawiki-1.19.2/ ; chmod -R g+rwX /home/gleki/public_html/mediawiki-1.19.2/
    replacing the paths acording to where you are moving LMW to.
    chcon -R -t httpd_user_rw_content_t /home/gleki/public_html/mediawiki-1.19.2/images
    However, it's possible that additional steps may be necessary to make this permanent: SELINUX has a notion of centrally configured contexts which can be restored, and it may be the case that the central configuration needs to be updated, else this will be reversed if "restorecon" is run on these directories. It's also possible that restorecon is automatically run from time to time by puppet, etc.

Make LMW faster

Update extensions

once in a while. Ensure you are in /extensions folder of the root of your MediaWiki deployment directory.

Note that some of extensions require manual patches.

rm -rf Babel ; rm -rf cldr ; rm -rf CleanChanges ; rm -rf LocalisationUpdate ; rm -rf Translate ; rm -rf UniversalLanguageSelector

for ext in Babel cldr CleanChanges LocalisationUpdate Translate UniversalLanguageSelector
 do
   if [ ! -d "$ext" ]
   then
     git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/$ext.git
   fi
 done
rm -rf VisualEditor ; git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VisualEditor.git
cd VisualEditor
git submodule update --init

cd ..

Images

Some thumbnails might not be displayed. Change LocalSettings to point to the complete path of /usr/bin/convert (or whatever according to your server) and chown the entire directory to apache:apache (or whatever).

Scribunto

For it to work you might need to run

chmod a+x /home/gleki/public_html/mediawiki-1.19.2/extensions/Scribunto/engines/LuaStandalone/binaries/*/lua

chcon -t httpd_user_script_exec_t /home/gleki/public_html/mediawiki-1.19.2/extensions/Scribunto/engines/LuaStandalone/binaries/*/lua

Note that the above is now in puppet and a restorecon should be sufficient if lua breaks.

Wikiforum

needs the following patch:

vim WikiForum/WikiForum.php

Then comment out the following line:

//$wgHooks['SkinTemplateToolboxEnd'][] = 'WikiForumHooks::addNavigationLinkToToolbox';

SimpleTable

As of Mediawiki 1.24alpha only SimpleTable version 1.2a (not later!) works.

http://www.mediawiki.org/wiki/Extension:SimpleTable

SocialProfile

If a user SomeName doesn't exist and when I create a page User:SomeName I can't edit it's code when SocialProfile is enabled. VisualEditor works okay, though.

But what you should do after each update of this extension is to comment out lines 133-135 of SocialProfile/UserProfile/UserProfile.php. After that, you should be able to edit the namespace like normal, and still have the ability for user profiles to appear on the user page.

Also run chmod -R 775 /home/gleki/public_html/mediawiki-1.19.2/images

UniversalLanguageSelector

This patch might damage LMW, you may apply this patch to ULS extension until it is included into the MediaWiki core. https://gerrit.wikimedia.org/r/#/c/120475/

If not done users after being registered and logged in will fall back to Lojban interface of LMW which is confusing.

Just run

cd .. ; git fetch https://gerrit.wikimedia.org/r/mediawiki/core refs/changes/75/120475/5 && git checkout FETCH_HEAD ; cd extensions

ConfirmAccount

Since the author hasn't updated the extension yet we have to use the following patch in extensions/ConfirmAccount/business/AccountRequestSubmission.php:

# Check if biography is long enough
$bioWordCount = preg_match_all("/\\p{L}[\\p{L}\\p{Mn}\\p{Pd}'\\x{2019}]*/u", $this->bio, $matches);
if ($bioWordCount < $wgAccountRequestMinWords) {