[Mediawiki-l] Extension help: why is text appearing twice?

Daniel Barrett danb at VistaPrint.com
Tue Aug 28 19:05:33 UTC 2007


I'm having a mysterious problem with a custom extension (in MW 1.10.1)
that seems to be running twice instead of once. Here is a minimal
example:
 
		<?php
		$wgHooks['ParserBeforeTidy'][] = 'Problem';
		function Problem(&$parser, &$text) {
		  $text = "$text abc";
		}
		?>

This should simply append the string "abc" to the end of the article
text, and it does.  However, it also prints "abc" inside the footer!
The footer append is happening here (notice the "abc"):

		<li id="viewcount"><p>This page has been accessed 2,125
times.</p> abc</li>

Why does this second append happen, and how can it be prevented?

I disabled all our other extensions, and the problem still occurs.

Thanks,
DanB



More information about the MediaWiki-l mailing list