TurnKey Linux Virtual Appliance Library

MediaWiki Special:Import fails with error 500 on v12.0; works fine on v11.3 (SOLVED)

carko's picture

Deployed turnkey-mediawiki-12.0-squeeze-x86-ovf.zip with no problems.  I went to access the Special:Import MediaWiki page which gives an HTTP 500 error.  Fresh deployment, import attempted from default admin account.  Tried again on a second fresh VM, same results.  IE shows the 500 error, FF shows a blank page.

Deployed turnkey-mediawiki-11.3-lucid-x86-ovf.zip as a test, and import works fine.

Can't find a specific error in the logs to associate with the 500 error.  I would prefer to run the v12 package, but require the import function to work.  Help?

vmdeluxe's picture

Error from apache.log and... Solved!

From the apache log:

[Thu Nov 01 19:49:50 2012] [error] [client <snip>] PHP Fatal error:  Call to undefined method User::isAllowedAny() in /usr/share/mediawiki/includes/specials/SpecialImport.php on line 59, referer: http://<snip>/index.php/Special:SpecialPages

Looks like there is some awareness of this issue:


Here's a fix for everyone (credit due where credit due) constructed from information in the above link:

1) Download http://dumps.wikimedia.org/mediawiki/1.15/mediawiki-1.15.5.tar.gz

2) Unpackage the file \mediawiki-1.15.5\includes\specials\SpecialImport.php from the archive indicated in step 1

3) SFTP (I used FireFTP) to your turnkey-mediawiki-12.0-squeeze-x86 server

4) Navigate to /usr/share/mediawiki/includes/specials

5) Rename SpecialImport.php to SpecialImport.php.original

6) Upload the SpecialImport.php from step 2 to usr/share/mediawiki/includes/specials

7) Reboot your turnkey-mediawiki-12.0-squeeze-x86 server.  (This may not be necessary, but I did it to be rigorous)

8) Use Special:Import to your heart's content.

Because I only had to use Special:Import once, I thereafter renamed SpecialImport.php
 to SpecialImport.php.1-15-5 and SpecialImport.php.original to SpecialImport.php

Guest's picture

Error in apache log


This solved indeed the orignal problem, but now I stumbled on the next one (https://bugzilla.wikimedia.org/show_bug.cgi?id=21000). 

From the apache log:

PHP Warning:  xml_parse(): Unable to call handler in_() in /usr/share/mediawiki/includes/Import.php on line 437.

Bottom line is that I can't import the templates I want. 

This part definitely works in the last version of mediawiki: 1.20.2.

Are there any plans to release an appliance with a more recent version?


Jeremy Davis's picture

I'm not completely clear on the core dev's plans...

But ultimately a new appliance with a new version will be released. When that will be is anybody's guess at this point though...

Some of the other appliances have community member created update scripts (in the form of TKLPatches) so if you are particularly keen to see a newer appliance then perhaps that's something you could push for (by starting work on something like that for MediaWiki?)

The other thing to keep in mind is that it is possible that if the MediaWiki software comes from the Debian repos (rather than installed from upstream) that this bug is known and someone has figured a workaround?

Guest's picture

Thanks for the reply


On the short term we modified the templates manually to get them uploaded. If I have some time in the near future I'll see whether I can do some work on upgrade scripts.

In general I'm quite happy with the appliance. Especially the backup feature out-of-the-box is a definitive added value you don't find in similar offerings.



Jeremy Davis's picture

Thanks for posting back with the solution

And glad to hear you got it sorted.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)