Last modified: 2007-07-13 02:23:16 UTC
Steps to reproduce; problem is step 5: Step 1) Create a dummy page at [[test]]. Step 2) Edit index.php, and to the end add: global $wgOut; print $wgOut->parse( "[[test]]") ; Step 3) View the wiki, and observe that a link to "test" is indeed added to the page footer. Step 4) Edit index.php, and change the above two lines to read: global $wgOut; print $wgOut->parse( "{{subst::test}}" ); Step 5) View the wiki, and observe that rather than the contents of "test" being included, the output is the literal string "{{subst::test}}". Step 6) Make a new wiki page, insert "{{subst::test}}", and save, to confirm that this wiki text as part of an article does include the contents of "test". Please note that I am assuming that $wgOut->parse() is intended to handle arbitrary wiki text. If this is not the case, then this behaviour may be by-design, in which case please close this bug as Invalid.
Subst is a pre-save transform step, not a parse-time step.
(Also, surely there should be a single colon there and not two . . .)
(Er, right, it was a page in the main namespace, so that's correct. Never mind me.)
Below is more along the lines of what I should have done, thanks to Simetrical: ----------------- $page_title = "test"; $title = Title::makeTitle( NS_MAIN, $page_title ); $revision = Revision::newFromTitle( $title ); $wgOut->addWikiText( $revision->getRawText() ); -----------------