Fatal exception of type MWException

18,520

Solution 1

As written in the comments, edit your LocalSettings.php file and add this line at the very end:

$wgShowExceptionDetails = true;

Try reloading the page that gives you that error. You're likely to see what's called a backtrace... here is my example:

#0 /Users/user/www/extensions/LocalisationUpdate/LocalisationUpdate.class.php(553): LocalisationUpdate::filename('it')
#1 /Users/user/www/extensions/LocalisationUpdate/LocalisationUpdate.class.php(36): LocalisationUpdate::readFile('it')
#2 [internal function]: LocalisationUpdate::onRecache(Object(LocalisationCache), 'it', Array)
#3 /Users/user/www/includes/Hooks.php(255): call_user_func_array('LocalisationUpd...', Array)
#4 /Users/user/www/includes/GlobalFunctions.php(3883): Hooks::run('LocalisationCac...', Array)
#5 /Users/user/www/includes/cache/LocalisationCache.php(796): wfRunHooks('LocalisationCac...', Array)
#6 /Users/user/www/includes/cache/LocalisationCache.php(426): LocalisationCache->recache('it')
#7 /Users/user/www/includes/cache/LocalisationCache.php(310): LocalisationCache->initLanguage('it')
#8 /Users/user/www/includes/cache/LocalisationCache.php(245): LocalisationCache->loadItem('it', 'fallback')
#9 /Users/user/www/languages/Language.php(3978): LocalisationCache->getItem('it', 'fallback')
#10 /Users/user/www/languages/Language.php(230): Language::getFallbacksFor('it')
#11 /Users/user/www/languages/Language.php(189): Language::newFromCode('it')
#12 /Users/user/www/includes/Setup.php(497): Language::factory('it')
#13 /Users/user/www/includes/WebStart.php(161): require_once('/Users/user/3d...')
#14 /Users/user/www/index.php(55): require('/Users/user/3d...')
#15 {main}

The first line is the one that stopped the execution, causing the exception. If you can identify the problem (in my case it's the LocalisationUpdate extension) it can be very easy to fix. Again, in my case it's enough to open again LocalSettings.php and comment out or delete the line:

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

Solution 2

There could be a problem with caching, try to use

$wgMainCacheType = CACHE_NONE;
Share:
18,520

Related videos on Youtube

gvd
Author by

gvd

Updated on September 06, 2022

Comments

  • gvd
    gvd over 1 year

    I recently installed MediaWiki in localhost on Debian 7 System. But after the installation, I got the exception Fatal exception of type MWException. I reviewed all reported bugs, but they do not apply to me.

    PHP 5.4.4 phpmyaddmin....

    • PleaseStand
      PleaseStand almost 11 years
      "$wgShowExceptionDetails Enable more details (like a stack trace) to be shown on the "Fatal error" page." We would need to know more than just "Fatal exception of type MWException".