Author: darren.edmundson
Description:
If you have a specialpage which uses $wgOut->addWikiText(), as recommended on
http://meta.wikimedia.org/w/index.php/Writing_a_new_special_page#OutputPage-
.3EaddWikiText.28.29 , and that page is transcluded into a page more than once
(or two such pages are transcluded, etc), then all but the last transclusion
are displayed as the "\07UNIQ-" replacement token rather than the page output.
This appears to be caused by OutputPage::addWikiText requesting the parser
state be cleared after execution, removing the earlier transcluded HTML from
the replacement table before it's actually substituted in the document.
As a workaround for my own use, I've written my own MySpecialPage->addWikiText
() which doesn't clear the state (but may well break other things) - but if
this is the preferred(/documented) way of writing special pages, then it may
need fixing for other people too.
I first saw this when trying to transclude multiple different subpages of my
IncludableSpecialPage, but have since confirmed it happens in the more general
case. Predictably $wgOut->addHTML() does not cause this problem as the parser
is not invoked.
Version: 1.9.x
Severity: normal