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

Daniel Barrett danb at VistaPrint.com
Tue Aug 28 19:15:01 UTC 2007

Oooh, it gets worse. When I edit a page, the extension output appears
five more times on the page....


From: Daniel Barrett 
Sent: Tuesday, August 28, 2007 3:05 PM
To: MediaWiki announcements and site admin list
Subject: Extension help: why is text appearing twice?

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
		$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.


More information about the MediaWiki-l mailing list