[Mediawiki-l] Upgrade to 1.4.0 breaks extension

Jean-Christian Imbeault jci at gol.com
Thu Mar 24 00:39:55 UTC 2005


I posted this a few days ago but didn't get a response. I'm reposted in 
the hopes that my original post was missed.

I've upgraded from 1.3.10 to 1.4.0 and one of my extensions no longer works.

I think the problem might have to do with my use of:

$wgParser->internalParse($output, 0)


While trying to get an extension to run I got the following in my apache
error logs.

[error] PHP Warning:  end(): Passed variable is not an array or object
in /home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Warning:  end(): Passed variable is not an array or object
in /home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Warning:  end(): Passed variable is not an array or object
in /home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Warning:  end(): Passed variable is not an array or object
in /home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Notice:  Undefined index:  html in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 373
[error] PHP Fatal error:  Unsupported operand types in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 373

In case it is useful here is my extension:

$wgExtensionFunctions[] = "wfTableSchema";

function wfTableSchema() {
   global $wgParser;
   $wgParser->setHook( "tableSchema", "renderTableSchema" );
}

function renderTableSchema( $input )
{
   global $wgTitle, $wgParser;
   $CLASSPATH =
"/home/imbeauje/src/:/home/imbeauje/Tools/lib/jconn2.jar";
   $title = $wgTitle->getDBkey();
   //title is of the form database..tableName. Parse to extract
   list($dbName, $tableName) = explode("..", $title);
   $dbName = strtolower($dbName);
   //then pass as params to java prog that will generate table
   $cmd = "java -classpath $CLASSPATH ".
          "wikiTools.WikiDatabaseTableGenerator $dbName
$tableName";
   $output = `$cmd`;
   $output = $wgParser->internalParse($output, 0);
   return $output;
}
?>

I've also filed this in bugzilla at:

http://bugzilla.wikimedia.org/show_bug.cgi?id=1732

Jc




More information about the MediaWiki-l mailing list