Ticket #736 (closed maintenance: fixed)

Opened 2 years ago

Last modified 2 years ago

Upgrade to MediaWiki 1.23.0

Reported by: chris Owned by: chris
Priority: major Milestone: Maintenance
Component: Mediawiki Keywords:
Cc: ed Estimated Number of Hours: 0.0
Add Hours to Ticket: 0 Billable?: yes
Total Hours: 6.92

Description

From the announcements list:

I am happy to announce the availability of the first stable release of the new MediaWiki 1.23 release series.

MediaWiki 1.23 is a large release that contains many new features and bug fixes. This is a summary of the major changes of interest to users. You can consult the RELEASE-NOTES-1.23 file for the full list of changes in this version.

This is a Long Term Support release (LTS) and will be supported until May 2017.

Our thanks to everyone who helped to improve MediaWiki by testing the release candidates and submitting bug reports.

What's new?

  • MediaWiki 1.23 includes all changes released in the smaller 1.23wmfX software deployments to Wikimedia sites.

Skin autodiscovery deprecated

Skin autodiscovery, the legacy skin installation mechanism used by MediaWiki since very early versions (around 2004), has been officially deprecated and will be removed in MediaWiki 1.25.

  • MediaWiki 1.23 will emit warnings in production if a skin using the deprecated mechanism is found.
  • See Manual:Skin autodiscovery for more information and a migration guide for site admins and skin developers.

Notifications

With 1.23, MediaWiki starts to behave more like a modern website as regards notifications, to keep the editors of your wiki engaged and always up to date about what interests them. This used to require several custom settings.

  • (bug 45020) Make preferences "Add pages I create and files I upload to my watchlist" and "pages and files I edit" true by default.
  • (bug 45022) Make preference "Email me when a page or file on my watchlist is changed" true by default.
  • (bug 49719) Watch user page and user talk page by default.

This will allow your new users to immediately start benefiting from the watchlist and email notification features, without needing to first read all the docs to find out that they're as useful as they are.

Merged extensions

Merged into 1.23:

  • ExpandTemplates (bug 28264).
  • AssertEdit (bug 27841) - documented at API:Assert.

Interface

  • (bug 42026) Add option to only show page creations in Special:Contributions (and API).
  • Add new special page to list duplicate files, Special:ListDuplicatedFiles.
  • (bug 60333) Add new special page listing tracking categories (Special:TrackingCategories).

Editing

  • A new special page Special:Diff was added, allowing users to create internal links to revision comparison pages using syntax such as Special:Diff/12345, Special:Diff/12345/prev or Special:Diff/12345/98765.

Help pages

With 1.23, MediaWiki begins a process of consolidation of its help pages. Now, most are using the Translate extension and can be easily translated and updated in hundreds languages.

In the coming months, we'll focus on making more of the central help pages translatable and on linking them from the relevant MediaWiki interfaces for better discoverability. Please help: add your own translations; update existing pages and cover missing MediaWiki topics.

Traditionally, help pages have been scattered on countless wikis and poorly translated; most of those on mediawiki.org were migrated with the help of some Google Code-in students.

CSS refresh for Vector

  • Various Vector CSS properties have been converted to LESS variables.
  • The font size of #bodyContent/.mw-body-content has been increased to 0.875em.
  • The line-height of #bodyContent/.mw-body-content has been increased to 1.6.
  • The line-height of superscript (sup) and subscript (sub) are now set to 1.
  • The default color for content text (but not the headers) is now #252525; (dark grey).
  • All headers have updated sizes and margins.
  • H1 and H2 headers now use a serif font.
  • Body font is "sans-serif" as always.

For more information see Typography refresh.

Configuration

Add Config and GlobalConfig classes:

  • Allows configuration options to be fetched from context.
  • Only one implementation, GlobalConfig, is provided, which simply returns $GLOBALS[$name]. There can be more classes in the future, possibly a database-based one. For convinience the "wg" prefix is automatically added.
  • This adds the $wgConfigClass global variable which is used to determine which implementation of Config to use by default.
  • The ContextSource getConfig and setConfig methods were introduced.

Full release notes:
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/1.23.0/RELEASE-NOTES-1.23
https://www.mediawiki.org/wiki/Release_notes/1.23


Download:
http://download.wikimedia.org/mediawiki/1.23/mediawiki-1.23.0.tar.gz

GPG signatures:
http://download.wikimedia.org/mediawiki/1.23/mediawiki-1.23.0.tar.gz.sig

Public keys:
https://www.mediawiki.org/keys/keys.html

I'd suggest we upgrade to this version and then perhaps stick with it, only doing security updates, until we need to move to another version due to it no longer being supported or because we need some new functionality.

Attachments

signature.asc (496 bytes) - added by ed 2 years ago.
Added by email2trac

Change History

comment:1 in reply to: ↑ description Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.45
  • Total Hours changed from 0.0 to 0.45

Reading the release notes, https://git.wikimedia.org/blob/mediawiki%2Fcore.git/1.23.0/RELEASE-NOTES-1.23 there don't appear to be any issues we need to be aware of.

These are the current versions, taken from https://wiki.transitionnetwork.org/Special:Version

Going through these one by one:

So the only, potentially, complicated issue here is switching from a version of Parsoid checked out from git to a .deb version, but once that has been done it's another application that can be updated via the regular debian update process, which is a good thing.

Ed is it OK if I proceed on this basis:

Replying to chris:

I'd suggest we upgrade to this version and then perhaps stick with it, only doing security updates, until we need to move to another version due to it no longer being supported or because we need some new functionality.

comment:2 follow-up: ↓ 3 Changed 2 years ago by ed

It's OK to update it if we need to do it due to a security update - I can't ascertain if that is the case. Is that the case?

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 2 years ago by chris

Replying to ed:

It's OK to update it if we need to do it due to a security update - I can't ascertain if that is the case. Is that the case?

Not yet, the version we are running will go out of support at some point but not sure when that is. The latest version is a long term support version so switching to that and then sticking with it unless there is a new feature we need should make security updates easier for the medium term -- we did run with a LTS version for a long time before, 1.19.x, see wiki:MediaWiki#Updates.

comment:4 in reply to: ↑ 3 Changed 2 years ago by chris

Replying to chris:

the version we are running will go out of support at some point

December 2014, see https://www.mediawiki.org/wiki/Version_lifecycle

The version I'm suggesting we upgrade to will have support till May 2017 -- almost 3 years.

comment:5 Changed 2 years ago by ed

OK - do it, thanks.

Last edited 2 years ago by ed (previous) (diff)

comment:6 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 2.26
  • Total Hours changed from 0.45 to 2.71

Updating MediaWiki, following wiki:MediaWiki#Updates:

sudo -i
cd /web/wiki.transitionnetwork.org
export MW="1.23.0"
wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-$MW.tar.gz -O mediawiki-$MW.tar.gz
wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-$MW.tar.gz.sig -O mediawiki-$MW.tar.gz.sig
gpg --verify mediawiki-$MW.tar.gz.sig 
tar -zxvf mediawiki-$MW.tar.gz
rsync -av mediawiki-$MW/ www/
chown root:root -R www/
chown -R www-data:www-data www/cache/
chown -R www-data:www-data www/images/
cd www/maintenance/
php update.php 
cd /web/wiki.transitionnetwork.org
rm mediawiki-$MW.tar.gz mediawiki-$MW.tar.gz.sig
rm -rf mediawiki-$MW

Updating plugins:

wget https://github.com/DaSchTour/piwik-mediawiki-extension/archive/master.zip -O Piwik.zip
unzip Piwik.zip
rsync -av piwik-mediawiki-extension-master/ www/extensions/Piwik/
rm Piwik.zip
wget https://codeload.github.com/wikimedia/mediawiki-extensions-VisualEditor/legacy.tar.gz/REL1_23 -O VisualEditor.tgz
tar -zxvf VisualEditor.tgz
rsync -av wikimedia-mediawiki-extensions-VisualEditor-634b141/ www/extensions/VisualEditor/

Switching to a .deb for Parsoid, following the docs and referencing the last install, ticket:706#comment:10:

/etc/init.d/pslparsoid stop
echo "deb http://parsoid.wmflabs.org:8080/debian wmf-production/" > /etc/apt/sources.list.d/parsoid.list
apt-get update && apt-get install parsoid
  Adding group `parsoid' (GID 114) ...
  Done.
  Adding system user `parsoid' (UID 110) ...
  Adding new user `parsoid' (UID 110) with group `parsoid' ...
  Not creating home directory `/usr/lib/parsoid'.
  Started Parsoid server on port 8142

The key files this installed, and which need checking, are:

/etc/default/parsoid
/etc/mediawiki/parsoid/settings.js
/etc/init.d/parsoid
/etc/logrotate.d/parsoid

These lines were edited in /etc/mediawiki/parsoid/settings.js:

        // chris
        //parsoidConfig.setInterwiki( 'localhost', 'http://localhost/w/api.php' );
        parsoidConfig.setInterwiki( 'localhost', 'http://wiki.transitionnetwork.org/api.php' );

        // chris
        //parsoidConfig.allowCORS = '*';
        parsoidConfig.allowCORS = 'wiki.transitionnetwork.org';

These lines were changed in /etc/default/parsoid:

# chris
INTERFACE="127.0.0.1"
#INTERFACE="0.0.0.0"

# chris
DAEMON_ARGS="-n 2 -c $PARSOID_SETTINGS_FILE"
#DAEMON_ARGS="-c $PARSOID_SETTINGS_FILE"

We are now running on a different port, so /web/wiki.transitionnetwork.org/www/LocalSettings.php was edited and these lines were changed:

//$wgVisualEditorParsoidURL = 'http://localhost:8000';
$wgVisualEditorParsoidURL = 'http://localhost:8142';

Test it:

lynx http://localhost:8142/

Parsoid appears to be working OK but editing via https://wiki.transitionnetwork.org/ isn't...

Tried:

cd /usr/lib/parsoid 
npm install
  npm WARN package.json parsoid@0.0.1 No README data
  npm WARN unmet dependency /usr/lib/parsoid/node_modules/handlebars/node_modules/uglify-js requires async@'~0.2.6' but will load
  npm WARN unmet dependency /usr/lib/parsoid/node_modules/async,
  npm WARN unmet dependency which is version 0.8.0

That didn't solve it... Perhaps this, above, is the issue Not creating home directory `/usr/lib/parsoid'. so:

aptitude remove parsoid
rm -rf /usr/lib/parsoid
aptitude install parsoid
cd /usr/lib/parsoid  
npm install
  npm WARN package.json parsoid@0.0.1 No README data
  npm WARN unmet dependency /usr/lib/parsoid/node_modules/handlebars/node_modules/uglify-js requires async@'~0.2.6' but will load
  npm WARN unmet dependency /usr/lib/parsoid/node_modules/async,
  npm WARN unmet dependency which is version 0.8.0

And from http://archive.today/oZohQ tried running the test:

npm test

  > parsoid@0.0.1 test /usr/lib/parsoid
  > node tests/parserTests.js
  
  
  module.js:340
      throw err;
            ^
  Error: Cannot find module '/usr/lib/parsoid/tests/parserTests.js'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Function.Module.runMain (module.js:497:10)
      at startup (node.js:119:16)
      at node.js:902:3
  npm ERR! Test failed.  See above for more details.
  npm ERR! not ok code 0

Changing to /usr/lib/parsoid/src and running it:

npm test
  ==========================================================
  SUMMARY: 
  wt2html: 886 passed (0 unexpected, 4 whitelisted) / 434 failed (0 unexpected)
  wt2wt: 1173 passed (0 unexpected, 0 whitelisted) / 125 failed (0 unexpected)
  html2html: 792 passed (0 unexpected, 0 whitelisted) / 465 failed (0 unexpected)
  html2wt: 355 passed (0 unexpected, 0 whitelisted) / 903 failed (0 unexpected)
  TOTAL: 3206 passed (0 unexpected, 4 whitelisted) / 1927 failed (0 unexpected)
  
  
  3206 total passed tests (expected 3206), 1927 total failures (expected 1927)
  --> NO UNEXPECTED RESULTS <--
  ==========================================================
  WARNING: parserTests.txt not up-to-date with upstream.
           Run fetch-parserTests.txt.js to update.
  ==========================================================

So the install was run in the wrong place before, running it in the right place:

cd /usr/lib/parsoid/src 
npm install
npm test
  ==========================================================
  SUMMARY: 
  wt2html: 886 passed (0 unexpected, 4 whitelisted) / 434 failed (0 unexpected)
  wt2wt: 1173 passed (0 unexpected, 0 whitelisted) / 125 failed (0 unexpected)
  html2html: 792 passed (0 unexpected, 0 whitelisted) / 465 failed (0 unexpected)
  html2wt: 355 passed (0 unexpected, 0 whitelisted) / 903 failed (0 unexpected)
  TOTAL: 3206 passed (0 unexpected, 4 whitelisted) / 1927 failed (0 unexpected)
  
  
  3206 total passed tests (expected 3206), 1927 total failures (expected 1927)
  --> NO UNEXPECTED RESULTS <--
  ==========================================================
  WARNING: parserTests.txt not up-to-date with upstream.
           Run fetch-parserTests.txt.js to update.
  ==========================================================

Updating the tests:

cd tests/
./fetch-parserTests.txt.js 
  Fetching parserTests.txt from mediawiki/core
cd ..
npm test
  ==========================================================
  SUMMARY: 
  wt2html: 838 passed (0 unexpected, 4 whitelisted) / 462 failed (28 unexpected)
  wt2wt: 1158 passed (0 unexpected, 0 whitelisted) / 123 failed (3 unexpected)
  html2html: 764 passed (0 unexpected, 0 whitelisted) / 477 failed (15 unexpected)
  html2wt: 316 passed (0 unexpected, 0 whitelisted) / 938 failed (40 unexpected)
  TOTAL: 3076 passed (0 unexpected, 4 whitelisted) / 2000 failed (86 unexpected)
  
  
  3076 total passed tests (expected 3162), 2000 total failures (expected 1914)
  ==========================================================
  npm ERR! Test failed.  See above for more details.
  npm ERR! not ok code 0

But the editor still isn't working, so, trying a re-install:

rm -rf /usr/lib/node_modules
curl --insecure https://www.npmjs.org/install.sh | bash

Still not working :-(

More on this tomorrow...

comment:7 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 2.0
  • Total Hours changed from 2.71 to 4.71

Spent some time looking at the Ngnix config to see if I could spot the problem.

Backing up the site files and installing everything from scratch, past upgrade have overwritten old files with new ones:

cd /web/wiki.transitionnetwork.org/
export MW="1.23.0"
wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-$MW.tar.gz -O mediawiki-$MW.tar.gz
wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-$MW.tar.gz.sig -O mediawiki-$MW.tar.gz.sig
gpg --verify mediawiki-$MW.tar.gz.sig 
tar -zxvf mediawiki-$MW.tar.gz
wget https://github.com/DaSchTour/piwik-mediawiki-extension/archive/master.zip -O Piwik.zip
unzip Piwik.zip
mv piwik-mediawiki-extension-master mediawiki-1.23.0/extensions/Piwik
rm Piwik.zip
wget https://codeload.github.com/wikimedia/mediawiki-extensions-VisualEditor/legacy.tar.gz/REL1_23 -O VisualEditor.tgz
tar -zxvf VisualEditor.tgz
mv wikimedia-mediawiki-extensions-VisualEditor-634b141 mediawiki-1.23.0/extensions/VisualEditor
rm VisualEditor.tgz
cp www/LocalSettings.php mediawiki-1.23.0/
chown root:root -R www/
cp -a www/images mediawiki-1.23.0/images
chown -R www-data:www-data mediawiki-1.23.0/cache/
chown -R www-data:www-data mediawiki-1.23.0/images/
mv www/ old/
mv mediawiki-1.23.0 www
/etc/init.d/php5-fpm restart
/etc/init.d/nginx restart

That didn't fix it.

Updated the nginx config:

        #location ~ /(api|index|opensearch_desc|redirect|trackback|img_auth|load|thumb)\.php?$ {
        location ~ /(api|img_auth|index|load|opensearch_desc|profileinfo|thumb|thumb_handler?$ {

Following the https://www.mediawiki.org/wiki/Parsoid/Troubleshooting page.

curl http://wiki.transitionnetwork.org/api.php
curl http://localhost:8142/ 
lynx -head -dump http://localhost:8142/localhost/Main_Page
  HTTP/1.1 302 Moved Temporarily
  X-Powered-By: Express
  Vary: Accept-Encoding
  Access-Control-Allow-Origin: *
  Cache-Control: private,no-cache,s-maxage=0
  Location: /localhost/Main_Page?oldid=757
  Date: Tue, 17 Jun 2014 10:54:08 GMT
  Connection: close
lynx -head -dump http://localhost:8142/localhost/Main_Page?oldid=757
  HTTP/1.1 200 OK
  X-Powered-By: Express
  Vary: Accept-Encoding
  Access-Control-Allow-Origin: *
  Cache-Control: s-maxage=2592000
  X-Parsoid-Performance: duration=1129; start=1403002488556
  Content-Type: text/html; charset=UTF-8
  Date: Tue, 17 Jun 2014 10:54:49 GMT
  Connection: close
curl http://localhost:8142/localhost/Sandbox -d wt="Hello ''world''" -d body=1
  <body data-parsoid='{"dsr":[0,15,0,0]}'><p data-parsoid='{"dsr":[0,15,0,0]}'>Hello <i data-parsoid='{"dsr":[6,15,2,2]}'>world</i></p></body>

Looks like it's working fine.

Looking at https://www.mediawiki.org/wiki/Parsoid

npm test
  npm ERR! Error: ENOENT, open '/web/wiki.transitionnetwork.org/www/package.json'
  npm ERR! If you need help, you may report this *entire* log,
  npm ERR! including the npm and node versions, at:
  npm ERR!     <http://github.com/npm/npm/issues>
  
  npm ERR! System Linux 2.6.32-5-xen-amd64
  npm ERR! command "node" "/usr/bin/npm" "test"
  npm ERR! cwd /web/wiki.transitionnetwork.org/www
  npm ERR! node -v v0.10.26
  npm ERR! npm -v 1.4.15
  npm ERR! path /web/wiki.transitionnetwork.org/www/package.json
  npm ERR! code ENOENT
  npm ERR! errno 34
  npm ERR! 
  npm ERR! Additional logging details can be found in:
  npm ERR!     /web/wiki.transitionnetwork.org/www/npm-debug.log
  npm ERR! not ok code 0

Trying in another directory:

cd /usr/lib/parsoid
npm test
  
  > parsoid@0.0.1 test /usr/lib/parsoid
  > node tests/parserTests.js
  
  
  module.js:340
      throw err;
            ^
  Error: Cannot find module '/usr/lib/parsoid/tests/parserTests.js'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Function.Module.runMain (module.js:497:10)
      at startup (node.js:119:16)
      at node.js:902:3
  npm ERR! Test failed.  See above for more details.
  npm ERR! not ok code 0

The file /usr/lib/parsoid/tests/parserTests.js doesn't exist, but /usr/lib/parsoid/src/tests/parserTests.js does...

Trying to reinstall npm:

curl -s https://www.npmjs.org/install.sh > /root/npm-install.sh
bash /root/npm-install.sh
  tar=/bin/tar
  version:
  tar (GNU tar) 1.26
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  
  Written by John Gilmore and Jay Fenlason.
  install npm@latest
  fetching: http://registry.npmjs.org/npm/-/npm-1.4.15.tgz
  0.10.26
  1.4.15
  cleanup prefix=/usr
  find: `/usr/lib/node': No such file or directory
  find: `/usr/lib/node': No such file or directory
  
  All clean!
  unbuild npm@1.4.15
  /usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
  npm@1.4.15 /usr/lib/node_modules/npm
  It worked

But still the test fails...

npm test
  npm ERR! Error: ENOENT, open '/root/package.json'
  npm ERR! If you need help, you may report this *entire* log,
  npm ERR! including the npm and node versions, at:
  npm ERR!     <http://github.com/npm/npm/issues>
  
  npm ERR! System Linux 2.6.32-5-xen-amd64
  npm ERR! command "node" "/usr/bin/npm" "test"
  npm ERR! cwd /root
  npm ERR! node -v v0.10.26
  npm ERR! npm -v 1.4.15
  npm ERR! path /root/package.json
  npm ERR! code ENOENT
  npm ERR! errno 34
  npm ERR! 
  npm ERR! Additional logging details can be found in:
  npm ERR!     /root/npm-debug.log
  npm ERR! not ok code 0

Not much help at https://www.npmjs.org/doc/faq.html ...

Perhaps the problem is related to not really understanding the nature of npm...

More on this later...

comment:8 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.4
  • Total Hours changed from 4.71 to 5.11

Found the directory to run the tests in:

cd /usr/lib/parsoid/src
npm test
 ...
  ==========================================================
  SUMMARY: 
  wt2html: 886 passed (0 unexpected, 4 whitelisted) / 434 failed (0 unexpected)
  wt2wt: 1173 passed (0 unexpected, 0 whitelisted) / 125 failed (0 unexpected)
  html2html: 792 passed (0 unexpected, 0 whitelisted) / 465 failed (0 unexpected)
  html2wt: 355 passed (0 unexpected, 0 whitelisted) / 903 failed (0 unexpected)
  TOTAL: 3206 passed (0 unexpected, 4 whitelisted) / 1927 failed (0 unexpected)
  
  
  3206 total passed tests (expected 3206), 1927 total failures (expected 1927)
  --> NO UNEXPECTED RESULTS <--
  ==========================================================
  WARNING: parserTests.txt not up-to-date with upstream.
           Run fetch-parserTests.txt.js to update.
  ==========================================================

But still nothing happens when one clicks the 'Edit' link. I have asked in irc://irc.freenode.net/mediawiki-parsoid but I don't think anybody is around, so I'm going to email the list.

For reference these are the latest Nginx config files we are using, /etc/nginx/sites-available/wiki:

# virtual server
# http://nginx.org/en/docs/http/ngx_http_core_module.html#server
# HTTP Server
server {

        # listen for ipv4
        # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
        #listen   8000; 
        listen   80;

        # logs, error log levels: info | notice | warn | error | crit | alert 
        # http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log
        # http://nginx.org/en/docs/ngx_core_module.html#error_log
        access_log  /var/log/nginx/wiki.access.log;
        error_log   /var/log/nginx/wiki.error.log   crit;

        # Redirect logins to https
        location ~ .*Special:UserLogin.* {
                #rewrite ^/Special:UserLogin(.*) https://$server_name:4430/Special:UserLogin$1? redirect;
                rewrite ^/Special:UserLogin(.*) https://$server_name/Special:UserLogin$1? redirect;
        }
        if ($args ~ "^(.*)title=Special:UserLogin"){
                #rewrite ^/(.*) https://$server_name:4430/index.php?$args? redirect;
                rewrite ^/(.*) https://$server_name/index.php?$args? redirect;
        }

        include  wiki-shared;

        # Pass php requests to php5-fpm
        #location ~ /(api|index|opensearch_desc|redirect|trackback|img_auth|load|thumb)\.php?$ {
        location ~ /(api|img_auth|index|load|opensearch_desc|profileinfo|thumb|thumb_handler?$ {
                try_files $uri =404;
                include fastcgi_params;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
        }
}

# HTTPS Server
server {
        #listen   4430;
        listen   443 ssl spdy;
        access_log  /var/log/nginx/wiki.ssl_access.log;
        error_log   /var/log/nginx/wiki.ssl_error.log crit;

        ssl  on;
        ssl_certificate  /etc/ssl/transitionnetwork.org/transitionnetwork.org.chained.pem;
        ssl_certificate_key  /etc/ssl/transitionnetwork.org/transitionnetwork.org.key;
        ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:+RC4:RC4;
        ssl_prefer_server_ciphers   on;
        add_header Strict-Transport-Security max-age=15768000;

        include  wiki-shared;

        # Pass php requests to php5-fpm
        #location ~ /(api|index|opensearch_desc|redirect|trackback|img_auth|load|thumb)\.php?$ {
        location ~ /(api|img_auth|index|load|opensearch_desc|profileinfo|thumb|thumb_handler?$ {
                try_files $uri =404;
                include fastcgi_params;
                fastcgi_param HTTPS on;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
        }

}

And that file includes /etc/nginx/wiki-shared which contains:

        # Everything below is the same for http and https

        # server name and server aliases        
        # http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name 
        server_name  wiki.transitionnetwork.org www.wiki.transitionnetwork.org wiki.penguin.webarch.net;

        # document root
        # http://nginx.org/en/docs/http/ngx_http_core_module.html#root
        root   "/web/wiki.transitionnetwork.org/www";

        # document index
        # http://nginx.org/en/docs/http/ngx_http_index_module.html#index
        index  index.php;
        # http://nginx.org/en/docs/http/ngx_http_autoindex_module.html#autoindex
        autoindex off;

        # location match
        # http://nginx.org/en/docs/http/ngx_http_core_module.html#location

        # Prevent access to any files starting with a dot, like .htaccess
        # or text editor temp files
        location ~ /\. {
                return 403;
        }
        # Prevent access to tmp files created by vim
        location ~ .\~$ {
                return 403;
        }
        # Do not log access to robots.txt, to keep the logs cleaner
        location = /robots.txt {
                access_log off;
                log_not_found off;
        }
        # Do not log access to the favicon, to keep the logs cleaner
        location = /favicon.ico {
                access_log off;
                log_not_found off;
        }
        #    Keep images and CSS around in browser cache for as long as possible,
        #    to cut down on server load
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                try_files $uri /index.php;
                expires max;
                log_not_found off;
        }

        location =  /LocalSettings.php  { return 403; }
        location ^~ /maintenance/       { internal; }
        location ^~ /bin/               { internal; }
        location ^~ /mw-config/         { internal; }
        location ^~ /cache/             { internal; }
        location ^~ /tests/             { internal; }
        location ^~ /includes/          { internal; }
        location ^~ /maths/             { internal; }
        location ^~ /serialized/        { internal; }
        location ^~ /languages/         { internal; }

        # /images is the upload directory where users can upload files witrh extensions
        # listed in LocalSettings.php so we want to make sure that html / php documents
        # are served as plain text 
        location ^~ /images/ {
                default_type text/plain;
                types {
                        text/plain              htm html shtml php php5;
                        # whitelist here of all file types allowed to be uploaded, 
                        image/gif                                                                       gif;
                        image/jpeg                                                                      jpeg jpg jpe;
                        image/png                                                                       png;
                        text/plain                                                                      txt;
                        video/x-msvideo                                                                 avi;
                        audio/mpeg                                                                      mpga mpega mp2 mp3 m4a;
                        audio/x-pn-realaudio                                                            ra rm ram;
                        video/mp4                                                                       mp4;
                        image/svg+xml                                                                   svg svgz;
                        application/pdf                                                                 pdf;
                        application/rtf                                                                 rtf;
                        application/msword                                                              doc dot;
                        application/vnd.ms-powerpoint                                                   ppt pps;
                        application/vnd.oasis.opendocument.chart                                        odc;
                        application/vnd.oasis.opendocument.database                                     odb;
                        application/vnd.oasis.opendocument.formula                                      odf;
                        application/vnd.oasis.opendocument.graphics                                     odg;
                        application/vnd.oasis.opendocument.graphics-template                            otg;
                        application/vnd.oasis.opendocument.image                                        odi;
                        application/vnd.oasis.opendocument.presentation                                 odp;
                        application/vnd.oasis.opendocument.presentation-template                        otp;
                        application/vnd.oasis.opendocument.spreadsheet                                  ods;
                        application/vnd.oasis.opendocument.spreadsheet-template                         ots;
                        application/vnd.oasis.opendocument.text                                         odt;
                        application/vnd.oasis.opendocument.text-master                                  odm;
                        application/vnd.oasis.opendocument.text-template                                ott;
                        application/vnd.oasis.opendocument.text-web                                     oth;
                        application/vnd.openxmlformats-officedocument.spreadsheetml.sheet               xlsx;
                        application/vnd.openxmlformats-officedocument.spreadsheetml.template            xltx;
                        application/vnd.openxmlformats-officedocument.presentationml.presentation       pptx;
                        application/vnd.openxmlformats-officedocument.presentationml.slideshow          ppsx;
                        application/vnd.openxmlformats-officedocument.presentationml.template           potx;
                        application/vnd.openxmlformats-officedocument.wordprocessingml.document         docx;
                        application/vnd.openxmlformats-officedocument.wordprocessingml.template         dotx;
                        image/x-photoshop                                                               psd;
                        application/postscript                                                          ps ai eps epsi epsf eps2 eps3;
                        image/tiff                                                                      tiff tif;
                        image/x-icon                                                                    ico;
                        application/vnd.ms-excel                                                        xls xlb xlt;
                }
                # If the files can't be found serve up the front page
                try_files $uri /index.php;
        }

        # This is the main rewrite to get nice URL's
        # http://wiki.nginx.org/MediaWiki
        location / {
                try_files $uri @rewrite;
        }
        location @rewrite {
                # http://blog.bigdinosaur.org/mediawiki-on-nginx/
                rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
        }

The /etc/default/parsoid has been modified from the default as we don't need 11 processes to be running:

# Defaults for parsoid initscript

# File where the parsoid daemon will write stderr and stdout to
PARSOID_LOG_FILE=/var/log/parsoid/parsoid.log

PARSOID_SETTINGS_FILE=/etc/mediawiki/parsoid/settings.js

PORT="8142"

# Default is to listen on all interfaces
# chris
INTERFACE="127.0.0.1"
#INTERFACE="0.0.0.0"

# chris
DAEMON_ARGS="-n 2 -c $PARSOID_SETTINGS_FILE"
#DAEMON_ARGS="-c $PARSOID_SETTINGS_FILE"

These config fiels have been posted here so I can reference them in a email to https://lists.wikimedia.org/mailman/listinfo/wikitext-l

comment:9 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.25
  • Total Hours changed from 5.11 to 5.36

comment:10 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.25
  • Total Hours changed from 5.36 to 5.61

Following the suggestions from Subramanya, installing the Parsoid extension:

cd /web/wiki.transitionnetwork.org
wget https://codeload.github.com/wikimedia/mediawiki-extensions-Parsoid/legacy.tar.gz/REL1_23 -O Parsoid.tgz
tar -zxvf Parsoid.tgz
mv wikimedia-mediawiki-extensions-Parsoid-8da3673 www/extensions/Parsoid
rm -rf Parsoid.tgz
rm -rf wikimedia-mediawiki-extensions-Parsoid-8da3673/

Adding the following to LocalSettings.php as per the notes Subramanya linked to:

// http://lists.wikimedia.org/pipermail/wikitext-l/2014-June/000883.html
require_once("$IP/extensions/Parsoid/Parsoid.php");
require_once("$IP/extensions/VisualEditor/VisualEditor.php");
 
// OPTIONAL: Enable VisualEditor in other namespaces
// By default, VE is only enabled in NS_MAIN
//$wgVisualEditorNamespaces[] = NS_PROJECT;

// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;

// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';

This hasn't made any difference -- nothing happens when the 'Edit' link is clicked.

comment:11 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.11
  • Total Hours changed from 5.61 to 5.72

Removing the Parsoid extension following the email from Gabriel, this line were commented in LocalSettings.php:

//require_once("$IP/extensions/Parsoid/Parsoid.php");

And it was deleted:

rm -rf www/extensions/Parsoid/

comment:12 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.5
  • Total Hours changed from 5.72 to 6.22

Following the email from James Forrester:

sudo -i
cd /web/wiki.transitionnetwork.org
wget https://releases.wikimedia.org/VisualEditor/VisualEditor-MediaWiki-REL1_23.tar.bz2
sha1sum VisualEditor-MediaWiki-REL1_23.tar.bz2 
  7cd90271f91b8ded9d6aae3f9166a11d3c7d0ee9  VisualEditor-MediaWiki-REL1_23.tar.bz2
bunzip2 VisualEditor-MediaWiki-REL1_23.tar.bz2
tar -xvf VisualEditor-MediaWiki-REL1_23.tar 
mv VisualEditor-REL1_23 www/extensions/VisualEditor 
rm -rf www/extensions/VisualEditor/

But that didn't appear to change anything, I also re-tried installing the Parsoid extension as per ticket:736#comment:10 and this also didn't change anything.

I have sent another email to the list.

Sorry this is turning out to be a lengthy process, with hindsight we should have perhaps waited till December to do the upgrade.

comment:13 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.25
  • Total Hours changed from 6.22 to 6.47

On the Parsoid and wikitext discussion list, Gabriel asked:

Are there any errors in the JavaScript console?

There are:

Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:52
Use of getAttributeNode() is deprecated. Use getAttribute() instead. load.php:34
Use of attributes' specified attribute is deprecated. It always returns true. load.php:34
Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. load.php:48

"Exception thrown by ext.visualEditor.core" load.php:145
"Error: constructor must be a function, cannot be a undefined" Error: constructor must be a function, cannot be a undefined
Stack trace:
oo.Factory.prototype.register@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=ext.visualEditor.base%2Ccore%2Cmediawiki%2CviewPageTarget%7Cext.visualEditor.core.desktop%7Cjquery.visibleText%7Cmediawiki.api.edit%7Cmediawiki.feedback%7Coojs%2Coojs-ui%2Crangy%7Cunicodejs.wordbreak&skin=vector&version=20140619T082858Z&*:505:553
@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=ext.visualEditor.base%2Ccore%2Cmediawiki%2CviewPageTarget%7Cext.visualEditor.core.desktop%7Cjquery.visibleText%7Cmediawiki.api.edit%7Cmediawiki.feedback%7Coojs%2Coojs-ui%2Crangy%7Cunicodejs.wordbreak&skin=vector&version=20140619T082858Z&*:321:531
runScript@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:155:934
execute/</checkCssHandles@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:156:353
execute/</cssHandle/<@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:156:483
jQuery.Callbacks/fire@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:12:958
jQuery.Callbacks/self.fireWith@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:14:253
jQuery.Callbacks/self.fire@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:14:296
addEmbeddedCSS@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:151:1
addEmbeddedCSS/<@https://wiki.transitionnetwork.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140617T102644Z:150:453
 load.php:145

I have posted this to the list.

comment:14 Changed 2 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.45
  • Total Hours changed from 6.47 to 6.92

A fix has been made, see also VisualEditor: REL1_23 branch not compatible with MediaWiki 1.23 and a new version of MediaWiki is out:

I'm not 100% sure that this fix made it into this version, but I'll try this first, so:

cd /web/wiki.transitionnetwork.org
export MW="1.23.1"
wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-$MW.tar.gz -O mediawiki-$MW.tar.gz
wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-$MW.tar.gz.sig -O mediawiki-$MW.tar.gz.sig
gpg --verify mediawiki-$MW.tar.gz.sig 
tar -zxvf mediawiki-$MW.tar.gz
rsync -av mediawiki-$MW/ www/
chown root:root -R www/
chown -R www-data:www-data www/cache/
chown -R www-data:www-data www/images/
cd www/maintenance/
php update.php 
cd /web/wiki.transitionnetwork.org
rm mediawiki-$MW.tar.gz mediawiki-$MW.tar.gz.sig
rm -rf mediawiki-$MW

And the VisualEditor isn't working, so following https://www.mediawiki.org/wiki/Extension:VisualEditor#Download

cd /web/wiki.transitionnetwork.org/www/extensions
mv VisualEditor VisualEditor.dist
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VisualEditor.git
cd VisualEditor
git checkout REL1_23
git submodule update --init

And now it works :-)

comment:15 Changed 2 years ago by chris

  • Status changed from new to closed
  • Resolution set to fixed

comment:16 follow-up: ↓ 17 Changed 2 years ago by ed

phew!

comment:17 in reply to: ↑ 16 Changed 2 years ago by chris

Replying to ed:

phew!

Indeed!

It was basically down to a buggy release of MediaWiki and our feedback helped sort this out, so I'd count the time spent of this upgrade as a contribution of the wider Free Software Movement...

Version 0, edited 2 years ago by chris (next)

comment:18 follow-up: ↓ 19 Changed 2 years ago by ed

'Free' to those who can afford it... very expensive to those that can't (identfity that quote, win a prize

comment:19 in reply to: ↑ 18 Changed 2 years ago by chris

Replying to ed:

'Free' to those who can afford it... very expensive to those that can't (identfity that quote, win a prize

It doesn't ring a bell...

In any case it is free as in freedom :-)

When we speak of “free software”, we're talking about freedom, not price. (Think of “free speech”, not “free beer”.) Specifically, it means that a user is free to run the program, change the program, and redistribute the program with or without changes.

comment:20 Changed 2 years ago by ed

  • Status changed from closed to reopened
  • Resolution fixed deleted
yes indeed. well my suggestion was funnier. with nail and i
On 1 Jul 2014, at 12:02, Transiton Technology Trac <trac@tech.transitionnetwork.org> wrote:

> #736: Upgrade to MediaWiki 1.23.0
> -------------------------------------+-------------------------------------
>           Reporter:  chris          |                      Owner:  chris
>               Type:  maintenance    |                     Status:  closed
>           Priority:  major          |                  Milestone:
>          Component:  Mediawiki      |  Maintenance
>           Keywords:                 |                 Resolution:  fixed
> Add Hours to Ticket:  0              |  Estimated Number of Hours:  0.0
>        Total Hours:  6.92           |                  Billable?:  1
> -------------------------------------+-------------------------------------
> 
> Comment (by chris):
> 
> Replying to [comment:18 ed]:
>> 'Free' to those who can afford it... very expensive to those that can't
> (identfity that quote, win a prize
> 
> It doesn't ring a bell...
> 
> In any case it is [https://www.gnu.org/philosophy/selling.html free as in
> freedom] :-)
> 
>> When we speak of “free software”, we're talking about freedom, not
> price. (Think of “free speech”, not “free beer”.) Specifically, it means
> that a user is free to run the program, change the program, and
> redistribute the program with or without changes.
> 
> -- 
> Ticket URL: <https://tech.transitionnetwork.org/trac/ticket/736#comment:19>
> Transition Technology <https://tech.transitionnetwork.org/trac>
> Support and issues tracking for the Transition Network Web Project.

~~~~
Ed Mitchell: Transition Network Web and Communications manager
web: http://transitionnetwork.org
project blog: http://transitionnetwork.org/blogs/ed-mitchell
mobile: +44 (0)7807 141 828
office hours: Mon (am), Tues (am), Thurs
company no. 6135675  charity no. 1128675
Subscribe to Transition news: http://tinyurl.com/transitionregister
~~~~




signature.asc

Changed 2 years ago by ed

Added by email2trac

comment:21 Changed 2 years ago by chris

  • Status changed from reopened to closed
  • Resolution set to fixed

Re-closing as it was re-opened by mistake.

Note: See TracTickets for help on using tickets.