Last modified: 2011-04-30 01:16:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23855, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21855 - wfMsgExt() calls Parser::parse(), causes problems when used inside parser hooks
wfMsgExt() calls Parser::parse(), causes problems when used inside parser hooks
Status: RESOLVED DUPLICATE of bug 17329
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.14.x
All All
: Normal minor (vote)
: ---
Assigned To: Tim Starling
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-15 13:18 UTC by Vitaliy Filippov
Modified: 2011-04-30 01:16 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Simple patch for this issue (929 bytes, patch)
2009-12-15 13:18 UTC, Vitaliy Filippov
Details

Description Vitaliy Filippov 2009-12-15 13:18:08 UTC
Created attachment 6882 [details]
Simple patch for this issue

wfMsgExt() calls OutputPage::parse()
OutputPage::parse() calls $wgParser->parse($text, $wgTitle, $popts, $linestart, TRUE, $this->mRevisionId), i.e $clearState = true.
So wfMsgExt() called by parser extension which is implemented using a tag hook leads to unsubstituted "UNIQ-...-QINU" inside the final article text in some cases, because all substitutions remembered before calling wfMsgExt() are lost.
That's not good :)
Comment 1 Roan Kattouw 2009-12-15 13:34:49 UTC
There is a broader issue here, which is that Parser::parse() is not supposed to be called recursively. wfMsgExt() will call Parser::parse() if its parse or parseinline option is set (one of them is set by default IIRC).
Comment 2 Alexandre Emsenhuber [IAlex] 2009-12-15 18:54:29 UTC

*** This bug has been marked as a duplicate of bug 17329 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links