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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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