Opened 6 years ago

Closed 6 years ago

#7017 closed Bug/Something is broken (fixed)

Mediawiki Fatal error: Call to undefined method User::isAllowedAny() in SpecialImport.php

Reported by: Owned by:
Priority: Low Component: Tech
Keywords: MediaWiki Cc:
Sensitive: no


Over the weekend, I ran into a problem importing pages into an MF/PL-hosted MediaWiki. I was able to work around the problem, and I'm opening this ticket for the purpose of documenting the issue, and the workaround I used.


  • view MediaWiki's Special:SpecialPages
  • click "Import Pages" (aka Special:Import)

Mediawiki shows the error message

Fatal error: Call to undefined method User::isAllowedAny() in /usr/share/mediawiki/includes/specials/SpecialImport.php on line 59

There's a debian bug report for this: My workaround is based on information in the debian bug.


We need to make a temporary copy of the includes directory, and replace SpecialImport.php with a copy from the original MediaWiki distribution.


# rename symlink
mv includes includes.PREV

# copy include directory
mkdir includes
rsync --archive includes.PREV/ includes/

# replace includes/specials/SpecialImport.php
# with a copy from

# comment out the following line in LocalSettings.php
# define('MW_INSTALL_PATH','/var/lib/mediawiki');

After taking these steps, Special:Import will work.

After importing, undo the workaround.

# Uncomment this line in LocalSettings.php
# #define('MW_INSTALL_PATH','/var/lib/mediawiki');

# remove local copy of includes directory
rm -rf includes

# put the includes symlink back
mv includes.PREV includes

Although the workaround fixes Special:Import, it does break other things.

From my perspective, there's no further action needed. If others agree, then we can just close this ticket.

Change History (2)

comment:1 Changed 6 years ago by

  • Owner set to
  • Status changed from new to assigned

Hi Steve,

Thanks for documenting this. I suspect this is a relatively unique use case, in which case, I agree that we should not need to take further action.


comment:2 Changed 6 years ago by

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

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.