Page MenuHomePhabricator

Changes to includes/Parser.php in MediaWiki1.9 are breaking DPLforum
Closed, InvalidPublic

Description

Author: carlb613

Description:
It appears that upgrading a MediaWiki 1.8 installation to 1.9-svn will break
operation of extensions such as DPLforum 2.1.1 extension, even if they had been
working properly under 1.8

The errors occur in the call to getMaxIncludeSize() in includes/Parser.php, line
2772 in the current version:

function replaceVariables( $text, $args = array(), $argsOnly = false ) {
        # Prevent too big inclusions
        if( strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) {
               return $text;
        }

Comment out that one if/return and the wiki (with the extension) becomes usable
again.

On access to any page with the <forum> tag, symptom is just a blank screen -
error logs indicate the code breaks as this one test fails with:

[Tue Dec 26 13:47:04 2006] [error] [client 127.0.0.1] PHP Fatal error: Call to
a member function getMaxIncludeSize() on a non-object in
/var/www/html/test/includes/Parser.php on line 2772

So changes made to core code are breaking things elsewhere. :(


Version: 1.9.x
Severity: normal
OS: Linux
Platform: PC
URL: http://meta.wikimedia.org/wiki/DPLforum

Details

Reference
bz8395

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:33 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz8395.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

After a quick read-through of the extension code itself, I rather suspect that
this breakage is due to the extension's authoring being somewhat out of date; it
seems to be declaring new parsers within parse runs, interacting with the global
parser within said runs, interacting with globals such as $wgUser when it should
be referring to the ParserOptions of the parent parser, etc. To be honest, I'm
not surprised it's broken.