Thread:Project:Support desk/Extension outputting UNIQ QINU text

Hi,

I'm trying to write a mediawiki extension that will pull the content from an existing article and display it on the front page. I want to use this extension because I could then change the article title in the extension and perhaps add more php features such as have an array hold a list of article titles in the extension, which I could then iterate through. I'm running a wiki on MW version 1.20.

The extension keeps showing a UNIQ-QINU number, i.e. UNIQ1c454b4cb729262-featured-00000004-QINU shows on my Wiki's Main Page. I've added the extension filename into my localsettings and it starts, I added the tag on my wiki main page, and here is the code:

$wgHooks['ParserFirstCallInit'][] = 'wfstart'; // Hook our callback function into the parserfunction wfstart( Parser $parser ) {	$parser->setHook( 'featured', 'wfFeaturedArticle' ); return true; }

function wfFeaturedArticle($input, array $args, Parser $parser) {	//Get title of my existing wiki article	$t = "Existing Article In My Wiki";	$article = new Article( Title::newFromText($t)); $text = $article->getContent; $final = $parser->recursiveTagParse($text); echo $final; }

This UNIQ-QINU output message is driving me crazy!! I tried the different solutions posted online, did many google searches, and also tried the fixes found at http://www.mediawiki.org/wiki/QINU_fix

Please provide a solution for the UNIQ-QINU output and also please suggest improvements to my code. I'm still new to pulling content from an Article object.

Maybe there is a better MW function to use for this?? Thanks for your help folks!