MediaWiki toolbar missing after DSM update

2014/11/19 at 09:21

Meh. Synology updated quite a few built-in components when updating the DSM (basically the „operating system“ of the Synology NAS boxes) from DSM 5.0 to DSM 5.1. Look at my previous articles to see what stuff broke, and how I fixed it, or at least how I found a suitable workaround for broken functionality. Let me make it clear that I’m not blaming Synology for the issues I’ve been facing; but having to fix stuff in the aftermath is a nuisance, anyway.

Okay, so here’s the most recent issue I found, and how I fixed it. When editing a page in the MediaWiki on one of my NAS boxes („zeus“), I found the toolbar was missing. Not a deal-breaker, but an inconvenience.synology-mediawiki-toolbar

In one of the articles I found by googling for „mediawiki toolbar missing“ someone suggested to turn on the Firefox web console (formerly: JavaScript console, if I remember correctly), and see if there were any JavaScript errors when editing a page. So I turned it on (CTRL+Shift+K), and indeed, an error showed up (marked in the screenshot below):

synology-mediawiki-debug-GetVersion

Googling for that error message, I found a short article pointing out that the „mw.loader.version“ function had been removed in a recent MediaWiki update. Thanks very much for that!🙂 Fortunately, the article also had a link to the respective bug, and to the fix, which is here:

https://gerrit.wikimedia.org/r/#/c/114094/1/modules/jquery.wikiEditor.js,unified

Here’s how I applied the fix:

  1. Get on the command line, as root.
  2. In the directory where the MediaWiki is installed (/volume1/web/MediaWiki by default), either grep for „mw.loader.version“, or simply believe me that the file you need to edit is under extensions/WikiEditor/modules. So change directory there.
  3. Make a copy of the file (cp jquery.wikiEditor.js jquery.wikiEditor.js.ORIG).
  4. Edit jquery.wikiEditor.js — I’m using vi for this.
  5. Locate the line that contains the wrong function (in vi, press / and type mw.loader.version, then press Return).
  6. Change mw.loader.version to mw.loader.getVersion.
  7. Save the file, and quit the editor (in vi, this is :wq).
root@zeus:/volume1/web/MediaWiki/extensions/WikiEditor/modules> ls -l jquery.wikiEditor.js*
-rw-r--r--    1 http     http         21440 Nov 19 09:04 jquery.wikiEditor.js
-rw-r--r--    1 root     root         21437 Nov 19 08:40 jquery.wikiEditor.js.ORIG

When done, edit a Wiki page in Firefox. You might have to forcibly reload the page in Edit mode, because Firefox loves to load pages from cache. Now, the JavaScript error should be gone, and the toolbar should be back.

Entry filed under: Computer, English, Synology. Tags: , , , , , .

SyncMe Wireless Firefox Tab Sync Issues


November 2014
M D M D F S S
« Jan   Dez »
 12
3456789
10111213141516
17181920212223
24252627282930

Neueste Beiträge

Enter your email address to follow this blog and receive notifications of new posts by email.

Schließe dich 208 Followern an

Face


%d Bloggern gefällt das: