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: https://id.mayfirst.org/srevilak Owned by: https://id.mayfirst.org/ross
Priority: Low Component: Tech
Keywords: MediaWiki Cc:
Sensitive: no

Description

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.

Problem

  • 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: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668601. My workaround is based on information in the debian bug.

Workaround

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

cd $ROOT_OF_MEDIAWIKI_INSTALLATION

# 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
# http://dumps.wikimedia.org/mediawiki/1.15/mediawiki-1.15.5.tar.gz

# 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 https://id.mayfirst.org/ross

  • Owner set to https://id.mayfirst.org/ross
  • 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.

~/ross

comment:2 Changed 6 years ago by https://id.mayfirst.org/ross

  • 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.