Last modified: 2013-12-07 06:58:01 UTC
Hi I am having a problem with echo because it won't let me use update.php at http://random-wikisaur.tk/mw-config/?page=ExistingWiki. I have to uninstall it to be able to use update.php please fix it.
Hi, could you post more detail on the problem? Thanks,
Well it says error Fatal error: Class 'EchoHooks' not found in /home/randwiki/public_html/extensions/Echo/Echo.php on line 532
paladox: For future reference, post the error message already in the initial comment.
Prioritization and scheduling of this bug is tracked on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/302
it says that from 531 to 538 there are problems here are the lines affected // 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; }
in echo.php
Please fix the issue
Running Mediawiki 1.22 Wmf 22
(In reply to comment #7) > it says that from 531 to 538 there are problems here are the lines affected Please don't paraphrase but post the **complete** output that makes you think so. Also see http://www.mediawiki.org/wiki/Manual:How_to_debug https://www.mediawiki.org/wiki/Thread:Project:Support_desk/extension_echo https://www.mediawiki.org/wiki/Thread:Extension_talk:Echo/Fatal_Error_when_Upgrading:_Class_%27EchoHooks%27_not_found/reply seem to cover the same issue, and that's probably also where this should be handled instead.
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
Still need to be defined in LocalSettings.php (Do we care about register_globals now?) Or even just do // By default, send emails for each notification as they come in $wgDefaultUserOptions['echo-email-frequency'] = /*EchoHooks::EMAIL_IMMEDIATELY*/0; if ( $wgAllowHTMLEmail ) { $wgDefaultUserOptions['echo-email-format'] = /*EchoHooks::EMAIL_FORMAT_HTML*/'html'; } else { $wgDefaultUserOptions['echo-email-format'] = /*EchoHooks::EMAIL_FORMAT_PLAIN_TEXT*/'plain-text'; }
hi thanks could you patch this in echo if this works please
Change 91485 had a related patch set uploaded by Bsitu: Remove class constant variable reference from Echo.php https://gerrit.wikimedia.org/r/91485
Change 91485 merged by jenkins-bot: Remove class constant variable reference from Echo.php https://gerrit.wikimedia.org/r/91485
The error is now saying Warning: Cannot modify header information - headers already sent in /home/u841643917/public_html/includes/Exception.php on line 245 Warning: Cannot modify header information - headers already sent in /home/u841643917/public_html/includes/Exception.php on line 246 Warning: Cannot modify header information - headers already sent in /home/u841643917/public_html/includes/Exception.php on line 247 Warning: Cannot modify header information - headers already sent in /home/u841643917/public_html/includes/Exception.php on line 212 Invalid callback in hooks for ParserFirstCallInit Backtrace: #0 /home/u841643917/public_html/includes/GlobalFunctions.php(3877): Hooks::run('ParserFirstCallInit', Array) #1 /home/u841643917/public_html/includes/parser/Parser.php(271): wfRunHooks('ParserFirstCallInit', Array) #2 /home/u841643917/public_html/includes/parser/Parser.php(283): Parser->firstCallInit() #3 /home/u841643917/public_html/includes/parser/Parser.php(4818): Parser->clearState() #4 /home/u841643917/public_html/includes/parser/Parser.php(363): Parser->startParse(Object(Title), Object(ParserOptions), 1, true) #5 /home/u841643917/public_html/includes/installer/Installer.php(591): Parser->parse('A <code>LocalSettings.php</code> file has been detected. To upgrade this installation, please enter the value of <code>$wgUpgradeKey</code> in the box below. You will find it in <code>LocalSettings.php</code>.', Object(Title), Object(ParserOptions), true) #6 /home/u841643917/public_html/includes/installer/WebInstaller.php(662): Installer->parse('A <code>LocalSettings.php</code> file has been detected. To upgrade this installation, please enter the value of <code>$wgUpgradeKey</code> in the box below. You will find it in <code>LocalSettings.php</code>.', true) #7 /home/u841643917/public_html/includes/installer/WebInstallerPage.php(359): WebInstaller->getInfoBox('A <code>LocalSettings.php</code> file has been detected. To upgrade this installation, please enter the value of <code>$wgUpgradeKey</code> in the box below. You will find it in <code>LocalSettings.php</code>.') #8 /home/u841643917/public_html/includes/installer/WebInstallerPage.php(347): WebInstaller_ExistingWiki->showKeyForm() #9 /home/u841643917/public_html/includes/installer/WebInstaller.php(275): WebInstaller_ExistingWiki->execute() #10 /home/u841643917/public_html/mw-config/index.php(61): WebInstaller->execute(Array) #11 /home/u841643917/public_html/mw-config/index.php(29): wfInstallerMain() #12 {main}
(In reply to comment #15) > The error is now saying > > > Warning: Cannot modify header information - headers already sent in > /home/u841643917/public_html/includes/Exception.php on line 245 > > Warning: Cannot modify header information - headers already sent in > /home/u841643917/public_html/includes/Exception.php on line 246 > > Warning: Cannot modify header information - headers already sent in > /home/u841643917/public_html/includes/Exception.php on line 247 > > Warning: Cannot modify header information - headers already sent in > /home/u841643917/public_html/includes/Exception.php on line 212 > Invalid callback in hooks for ParserFirstCallInit > Backtrace: > > #0 /home/u841643917/public_html/includes/GlobalFunctions.php(3877): > Hooks::run('ParserFirstCallInit', Array) > #1 /home/u841643917/public_html/includes/parser/Parser.php(271): > wfRunHooks('ParserFirstCallInit', Array) > #2 /home/u841643917/public_html/includes/parser/Parser.php(283): > Parser->firstCallInit() > #3 /home/u841643917/public_html/includes/parser/Parser.php(4818): > Parser->clearState() > #4 /home/u841643917/public_html/includes/parser/Parser.php(363): > Parser->startParse(Object(Title), Object(ParserOptions), 1, true) > #5 /home/u841643917/public_html/includes/installer/Installer.php(591): > Parser->parse('A <code>LocalSettings.php</code> file has been detected. > To upgrade this installation, please enter the value of > <code>$wgUpgradeKey</code> in the box below. > You will find it in <code>LocalSettings.php</code>.', Object(Title), > Object(ParserOptions), true) > #6 /home/u841643917/public_html/includes/installer/WebInstaller.php(662): > Installer->parse('A <code>LocalSettings.php</code> file has been detected. > To upgrade this installation, please enter the value of > <code>$wgUpgradeKey</code> in the box below. > You will find it in <code>LocalSettings.php</code>.', true) > #7 /home/u841643917/public_html/includes/installer/WebInstallerPage.php(359): > WebInstaller->getInfoBox('A <code>LocalSettings.php</code> file has been > detected. > To upgrade this installation, please enter the value of > <code>$wgUpgradeKey</code> in the box below. > You will find it in <code>LocalSettings.php</code>.') > #8 /home/u841643917/public_html/includes/installer/WebInstallerPage.php(347): > WebInstaller_ExistingWiki->showKeyForm() > #9 /home/u841643917/public_html/includes/installer/WebInstaller.php(275): > WebInstaller_ExistingWiki->execute() > #10 /home/u841643917/public_html/mw-config/index.php(61): > WebInstaller->execute(Array) > #11 /home/u841643917/public_html/mw-config/index.php(29): wfInstallerMain() > #12 {main} This is a completely different bug, no mention of Echo at all, and Echo also doesn't have a ParserFirstCallInit subscriber. Please open a new bug for this under MediaWiki => Installer Please also tell us what version of MediaWiki you are running
Ok I will open up another bug but the version of Mediawiki is Mediawiki 1.23 wmf1
Change 100120 had a related patch set uploaded by Legoktm: Remove class constant variable reference from Echo.php https://gerrit.wikimedia.org/r/100120
Change 100120 merged by jenkins-bot: Remove class constant variable reference from Echo.php https://gerrit.wikimedia.org/r/100120
Sigh. I've backported this to REL1_22.