Jump to content

Topic on Project:Support desk

[RESOLVED] Fatal exception of type MWException

9
Summary by Ciencia Al Poder

Add this to LocalSettings.php to display error details:

error_reporting( -1 );
ini_set( 'display_errors', 1 ); 
$wgShowExceptionDetails = true;

If you get an error No cache directory configured, set $wgCacheDirectory in your LocalSettings.php.

Mfeske (talkcontribs)

Hi there,

I made a new MediWiki installation. I selected all available plugins and get Fatal exception of type MWException. I found a post that I need to change something in a file. White but not in any.

greetings Michael

88.130.122.136 (talkcontribs)

Hi Michael,

see Manual:How_to_debug for th changes you need to make in order to see the actual error message itself.

Mfeske (talkcontribs)

Hello,

I make this: error_reporting( -1 ); ini_set( 'display_errors', 1 ); in the LocalSettings.php, but theire is only the Message: [394e72b8] 2013-11-19 11:01:55: Fatal exception of type MWException Log: exception] [4538235c] / Exception from line 541 of /mediawiki/mediawiki-1.21.2/extensions/LocalisationUpdate/LocalisationUpdate.class.php: No cache directory configured What does it mean?

Must I change somethink in extensions/LocalisationUpdate/LocalisationUpdate.class.php

       public static function filename( $lang ) {
               global $wgLocalisationUpdateDirectory, $wgCacheDirectory;
               $dir = $wgLocalisationUpdateDirectory ?
                       $wgLocalisationUpdateDirectory :
                       $wgCacheDirectory;
               if ( !$dir ) {
                       throw new MWException( 'No cache directory configured' );
               }
               return "$dir/l10nupdate-$lang.cache";
       }
88.130.119.75 (talkcontribs)

Hi!

No, you do not have to change anything in LocalisationUpdate.class.php. If what you posted is the code from there, then it is enough to either set $wgLocalisationUpdateDirectory or $wgCacheDirectory to a path, to which the webserver user can write. This path will then be used to cache the localization files.

Mfeske (talkcontribs)

sorry I did not quite understand. So should I change anything in the LocalisationUpdate.class.php? where should I add the other values ​​like?

88.130.119.75 (talkcontribs)

No, you should not change LocalisationUpdate.class.php.

Edit your LocalSettings.php file. This file holds a bunch of MediaWiki configuration variables. Add $wgLocalisationUpdateDirectory or $wgCacheDirectory to it and set it to an absolute path to the folder, in which MediaWiki should store the cache files.

E.g.

$wgCacheDirectory = '/path/to/my/wiki/mediawiki-cache';
Littlepear (talkcontribs)

Works for me, too!