https://bugzilla.wikimedia.org/show_bug.cgi?id=55469

Sam Reed (reedy) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |[email protected]
     Ever confirmed|0                           |1

--- Comment #10 from Sam Reed (reedy) <[email protected]> ---
I've just had it.

So, if you had Echo installed, and try to use the mediawki installer to update
MediaWiki (rather than cli update.php which is fine), you get this failure

http://192.168.0.190/w/mw-config/?page=ExistingWiki

( ! ) Fatal error: Class 'EchoHooks' not found in
/var/www/wiki/mediawiki/extensions/Echo/Echo.php on line 532
Call Stack
#    Time    Memory    Function    Location
1    0.0001    233888    {main}( )    ../index.php:0
2    0.0071    1608872    wfInstallerMain( )    ../index.php:29
3    0.0495    3791568    WebInstaller->execute( )    ../index.php:61
4    0.0549    4029776    WebInstaller_ExistingWiki->execute( )   
../WebInstaller.php:275
5    0.0549    4029832    Installer::getExistingLocalSettings( )   
../WebInstallerPage.php:284
6    0.0593    4243256    require(
'/var/www/wiki/mediawiki/core/LocalSettings.php' )    ../Installer.php:511
7    0.1952    5507120    require_once(
'/var/www/wiki/mediawiki/extensions/Echo/Echo.php' )   
../LocalSettings.php:399



Presumably related to the fact that the Autoloader code in MediaWiki isn't
active, so it doesn't follow the defined AutoLoader code, the class isn't
loaded automagically and it fatals.

$wgAutoloadClasses['EchoHooks'] = $dir . 'Hooks.php';


Moving where the constants are defined (maybe into Echo.php too), or deferring
the setting of this code till later on via using $wgExtensionFunctions

Something like:

$wgExtensionFunctions[] = 'efLoadEcho';

function efLoadEcho() {
    global $wgDefaultUserOptions;
    // By default, send emails for each notification as they come in
    $wgDefaultUserOptions['echo-email-frequency'] =
EchoHooks::EMAIL_IMMEDIATELY;

    if ( $wgAllowHTMLEmail ) {
        $wgDefaultUserOptions['echo-email-format'] =
EchoHooks::EMAIL_FORMAT_HTML;
    } else {
        $wgDefaultUserOptions['echo-email-format'] =
EchoHooks::EMAIL_FORMAT_PLAIN_TEXT;
    }
}



Of course, the simple fix is commenting out the line in LocalSettings.php, but
this won't be obvious to most people. That and they might need to run the
updater for Echo to create or update the tables

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to