enterprisemediawiki / HeaderFooter

Add common headers and footers to MediaWiki pages
http://www.mediawiki.org/wiki/Extension:Header_Footer
6 stars 18 forks source link

Fatal error: Call to a member function getMaxIncludeSize() on a non-object in /media/drive1/Projects/wiki/includes/parser/Parser.php on line 3135 #4

Open ghost opened 10 years ago

ghost commented 10 years ago

Hi, trying to get this to work on mediawiki 1.22. Was working but when I update some pages it brea=ks with this error: Fatal error: Call to a member function getMaxIncludeSize() on a non-object in /media/drive1/Projects/wiki/includes/parser/Parser.php on line 3135

I dont know mediawiki code that well but I know php etc quite well. Tried fixing myself but stuck. I have setup a this page /index.php/MediaWiki:Hf-nsfooter-?action=edit with contents of . I want comments on all pages, and this works.

Its just when I edit some pages it breaks. I have tracked down the area that is having the problem.

In function hOutputPageParserOutput this line calls the function which in turn causes the error:

$text .= '

'.self::conditionalInclude( $text, 'NONSFOOTER', $nsfooter ).'
';

In this function that is called, conditionalInclude, this line is the error:

$msgText = wfMessage( $msgId, array( 'parseinline' ) );

This then calls core media wiki stuff that breaks. I have tried replacing this code:

$msgText = wfMessage( $msgId, array( 'parseinline' ) );

with this

wfMsgExt( 'key', array( 'parseinline' ), $msgId );

but no joy. Be great if you could help me fix this as its a very important module for me. Thanks for any helps.

nogothenogo commented 9 years ago

i dont know php or the wiki code but when i turn the debug options on i get also error messages

Deprecated: Use of wfMsgExt was deprecated in MediaWiki 1.21. [Called from HeaderFooter::conditionalInclude in W:\WWW-ROOT\mediawiki\extensions\HeaderFooter\HeaderFooter.class.php at line 58] in W:\WWW-ROOT\mediawiki\includes\debug\MWDebug.php on line 302

Deprecated: Use of wfMsgGetKey was deprecated in MediaWiki 1.21. [Called from wfMsgExt in W:\WWW-ROOT\mediawiki\includes\GlobalFunctions.php at line 1740] in W:\WWW-ROOT\mediawiki\includes\debug\MWDebug.php on line 302

Deprecated: Use of wfEmptyMsg was deprecated in MediaWiki 1.21. [Called from HeaderFooter::conditionalInclude in W:\WWW-ROOT\mediawiki\extensions\HeaderFooter\HeaderFooter.class.php at line 66] in W:\WWW-ROOT\mediawiki\includes\debug\MWDebug.php on line 302

i dont know if this is related to your problem but maybe it can help you to debug this extension

jamesmontalvo3 commented 9 years ago

I don't following the OPs problem entirely, but the wfMsg*\ functions have been removed since they are deprecated.