Last modified: 2014-07-02 15:20:09 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 T67826, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65826 - Recursive parser calls
Recursive parser calls
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
unspecified
All All
: Highest normal (vote)
: MW 1.24 version
Assigned To: Bawolff (Brian Wolff)
:
: 51346 (view as bug list)
Depends on:
Blocks: UNIQ
  Show dependency treegraph
 
Reported: 2014-05-27 17:41 UTC by Aaron Schulz
Modified: 2014-07-02 15:20 UTC (History)
10 users (show)

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


Attachments

Description Aaron Schulz 2014-05-27 17:41:02 UTC
2014-05-27 11:30:54 mw1166 metawiki: [68d48737] [no req]   Exception from line 6291 of /usr/local/apache/common-local/php-1.24wmf5/includes/parser/Parser.php: Parser state cleared while parsing. Did you call Parser::parse recursively?
#0 /usr/local/apache/common-local/php-1.24wmf5/includes/parser/Parser.php(375): Parser->lock()
#1 /usr/local/apache/common-local/php-1.24wmf5/includes/OutputPage.php(1609): Parser->parse('<div class='err...', Object(Title), Object(ParserOptions), true, true, NULL)
#2 /usr/local/apache/common-local/php-1.24wmf5/includes/OutputPage.php(1549): OutputPage->addWikiTextTitle('<div class='err...', Object(Title), true, false, true)
#3 /usr/local/apache/common-local/php-1.24wmf5/includes/OutputPage.php(3775): OutputPage->addWikiText('<div class='err...')
#4 /usr/local/apache/common-local/php-1.24wmf5/extensions/Translate/specials/SpecialLanguageStats.php(165): OutputPage->wrapWikiMsg('<div class='err...', 'translate-mgs-n...')
#5 /usr/local/apache/common-local/php-1.24wmf5/includes/specialpage/SpecialPage.php(379): SpecialLanguageStats->execute(NULL)
#6 /usr/local/apache/common-local/php-1.24wmf5/includes/specialpage/SpecialPageFactory.php(507): SpecialPage->run(NULL)
#7 /usr/local/apache/common-local/php-1.24wmf5/includes/specialpage/SpecialPageFactory.php(546): SpecialPageFactory::executePath(Object(Title), Object(RequestContext), true)
#8 /usr/local/apache/common-local/php-1.24wmf5/includes/parser/Parser.php(3494): SpecialPageFactory::capturePath(Object(Title), Object(RequestContext))
#9 /usr/local/apache/common-local/php-1.24wmf5/includes/parser/Preprocessor_DOM.php(1153): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#10 /usr/local/apache/common-local/php-1.24wmf5/includes/parser/Parser.php(3226): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#11 /usr/local/apache/common-local/php-1.24wmf5/includes/parser/Parser.php(1238): Parser->replaceVariables('{{process heade...')
#12 /usr/local/apache/common-local/php-1.24wmf5/includes/parser/Parser.php(406): Parser->internalParse('{{process heade...')
#13 /usr/local/apache/common-local/php-1.24wmf5/includes/content/WikitextContent.php(327): Parser->parse('{{process heade...', Object(Title), Object(ParserOptions), true, true, 8234361)
#14 /usr/local/apache/common-local/php-1.24wmf5/includes/content/AbstractContent.php(486): WikitextContent->fillParserOutput(Object(Title), 8234361, Object(ParserOptions), true, Object(ParserOutput))
#15 /usr/local/apache/common-local/php-1.24wmf5/includes/WikiPage.php(3648): AbstractContent->getParserOutput(Object(Title), 8234361, Object(ParserOptions))
#16 /usr/local/apache/common-local/php-1.24wmf5/includes/poolcounter/PoolCounterWork.php(116): PoolWorkArticleView->doWork()
#17 /usr/local/apache/common-local/php-1.24wmf5/includes/Article.php(703): PoolCounterWork->execute()
#18 /usr/local/apache/common-local/php-1.24wmf5/includes/actions/ViewAction.php(44): Article->view()
#19 /usr/local/apache/common-local/php-1.24wmf5/includes/Wiki.php(431): ViewAction->show()
#20 /usr/local/apache/common-local/php-1.24wmf5/includes/Wiki.php(295): MediaWiki->performAction(Object(Article), Object(Title))
#21 /usr/local/apache/common-local/php-1.24wmf5/includes/Wiki.php(599): MediaWiki->performRequest()
#22 /usr/local/apache/common-local/php-1.24wmf5/includes/Wiki.php(451): MediaWiki->main()
#23 /usr/local/apache/common-local/php-1.24wmf5/index.php(46): MediaWiki->run()
#24 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#25 {main}
Comment 1 Andre Klapper 2014-05-28 13:24:54 UTC
(Information how often this happens welcome for judging how urgent it is to fix)
Comment 2 Niklas Laxström 2014-05-28 16:17:29 UTC
What would be the am appropriate fix? Are special pages no longer allowed to use OutputPage::addWikiMsg and wrapWikiMsg?
Comment 3 Bawolff (Brian Wolff) 2014-05-28 19:21:20 UTC
(In reply to Niklas Laxström from comment #2)
> What would be the am appropriate fix? Are special pages no longer allowed to
> use OutputPage::addWikiMsg and wrapWikiMsg?


OutputPage::addWikiMsg is fine. However OutputPage::wrapWikiMsg (along with OutputPage::addWikiText, OutputPage::addWikiTextTitle) never worked correctly when used from a special page that was being transcluded on a real page.
Comment 4 Aaron Schulz 2014-05-28 19:22:33 UTC
It's a huge chunk of the exception log now.
Comment 5 Umherirrender 2014-05-28 20:01:24 UTC
(In reply to Niklas Laxström from comment #2)
> What would be the am appropriate fix? Are special pages no longer allowed to
> use OutputPage::addWikiMsg and wrapWikiMsg?

See https://www.mediawiki.org/wiki/Manual:Special_pages#OutputPage-.3EaddWikiText.28.29

"If your special page is intended to be included in other pages, you should probably not use addWikiText() (or any other function that calls the parser. Message). Due to a bug in MediaWiki (Bug 16129), an included special page will mess up any inclusion before it on the same including page, showing strings like UNIQ10842e596cbb71da."
Comment 6 Niklas Laxström 2014-05-29 09:40:41 UTC
Okay. It should be easy to not use those functions at all or at least not when transcluding the special page.
Comment 7 Nemo 2014-05-29 10:30:45 UTC
*** Bug 51346 has been marked as a duplicate of this bug. ***
Comment 8 Chris Koerner 2014-06-05 02:15:44 UTC
I'm seeing a similar error with 1.24wmf4 and Semantic Forms 2.7. This is the message I get when trying to use a Special:RunQuery embeded in a page.

MediaWiki internal error.

Original exception: [c01a2a06] [no req] Exception from line 6391 of /var/www/html/w/includes/parser/Parser.php: Parser state cleared while parsing. Did you call Parser::parse recursively?
Backtrace:
#0 /var/www/html/w/includes/parser/Parser.php(475): Parser->lock()
#1 /var/www/html/w/extensions/SemanticForms/includes/SF_FormUtils.php(425): Parser->parse(string, Title, ParserOptions)
#2 /var/www/html/w/extensions/SemanticForms/includes/SF_FormPrinter.php(500): SFFormUtils::getFormDefinition(Parser, string, integer)
#3 /var/www/html/w/extensions/SemanticForms/specials/SF_RunQuery.php(79): SFFormPrinter->formHTML(string, boolean, boolean, integer, NULL, NULL, NULL, boolean, boolean)
#4 /var/www/html/w/extensions/SemanticForms/specials/SF_RunQuery.php(30): SFRunQuery->printPage(string, boolean)
#5 /var/www/html/w/includes/specialpage/SpecialPage.php(379): SFRunQuery->execute(string)
#6 /var/www/html/w/includes/specialpage/SpecialPageFactory.php(507): SpecialPage->run(string)
#7 /var/www/html/w/includes/specialpage/SpecialPageFactory.php(546): SpecialPageFactory::executePath(Title, RequestContext, boolean)
#8 /var/www/html/w/includes/parser/Parser.php(3594): SpecialPageFactory::capturePath(Title, RequestContext)
#9 /var/www/html/w/includes/parser/Preprocessor_DOM.php(1165): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#10 /var/www/html/w/includes/parser/Parser.php(3673): PPFrame_DOM->expand(PPNode_DOM)
#11 /var/www/html/w/includes/parser/Preprocessor_DOM.php(1165): Parser->braceSubstitution(array, PPFrame_DOM)
#12 /var/www/html/w/includes/parser/Parser.php(3326): PPFrame_DOM->expand(PPNode_DOM, integer)
#13 /var/www/html/w/includes/parser/Parser.php(1338): Parser->replaceVariables(string)
#14 /var/www/html/w/includes/parser/Parser.php(506): Parser->internalParse(string)
#15 /var/www/html/w/extensions/SemanticForms/specials/SF_RunQuery.php(99): Parser->parse(string, Title, ParserOptions)
#16 /var/www/html/w/extensions/SemanticForms/specials/SF_RunQuery.php(30): SFRunQuery->printPage(string, boolean)
#17 /var/www/html/w/includes/specialpage/SpecialPage.php(379): SFRunQuery->execute(string)
#18 /var/www/html/w/includes/specialpage/SpecialPageFactory.php(507): SpecialPage->run(string)
#19 /var/www/html/w/includes/Wiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#20 /var/www/html/w/includes/Wiki.php(599): MediaWiki->performRequest()
#21 /var/www/html/w/includes/Wiki.php(451): MediaWiki->main()
#22 /var/www/html/w/index.php(46): MediaWiki->run()
#23 {main}

Exception caught inside exception handler: [37f9f47f] [no req] Exception from line 1334 of /var/www/html/w/includes/WebRequest.php: FauxRequest::getRequestURL() not implemented
Backtrace:
#0 /var/www/html/w/includes/WebRequest.php(1385): FauxRequest->notImplemented(string)
#1 /var/www/html/w/includes/SkinTemplate.php(1162): FauxRequest->getRequestURL()
#2 /var/www/html/w/includes/SkinTemplate.php(534): SkinTemplate->buildContentNavigationUrls()
#3 /var/www/html/w/includes/SkinTemplate.php(257): SkinTemplate->prepareQuickTemplate(OutputPage)
#4 /var/www/html/w/includes/OutputPage.php(2146): SkinTemplate->outputPage()
#5 /var/www/html/w/includes/exception/MWException.php(220): OutputPage->output()
#6 /var/www/html/w/includes/exception/MWException.php(263): MWException->reportHTML()
#7 /var/www/html/w/includes/exception/MWExceptionHandler.php(45): MWException->report()
#8 /var/www/html/w/includes/exception/MWExceptionHandler.php(141): MWExceptionHandler::report(MWException)
#9 /var/www/html/w/includes/Wiki.php(465): MWExceptionHandler::handle(MWException)
#10 /var/www/html/
Comment 9 Niklas Laxström 2014-06-05 08:29:37 UTC
Please file a separate bug for each extension. For now it is easier to fix this in each extension separately.
Comment 10 Chris Koerner 2014-06-05 17:20:11 UTC
Roger Roger, bug filed - https://bugzilla.wikimedia.org/show_bug.cgi?id=66202
Comment 11 Aude 2014-06-20 15:07:44 UTC
related or duplicate of https://bugzilla.wikimedia.org/show_bug.cgi?id=62125 ?
Comment 12 Bawolff (Brian Wolff) 2014-06-20 19:12:35 UTC
I suppose we could temporarily replace $wgParser with a new Parser object in SpecialPageFactory::capturePath. Not sure if its worth it. The OutputPage methods are really the only methods left where this is an issue.
Comment 13 Gerrit Notification Bot 2014-06-20 20:45:21 UTC
Change 141056 had a related patch set uploaded by Brian Wolff:
Prevent OutputPage::addWikiText and friends from causing UNIQ fails

https://gerrit.wikimedia.org/r/141056
Comment 14 Gerrit Notification Bot 2014-06-26 09:25:26 UTC
Change 141056 merged by jenkins-bot:
Prevent OutputPage::addWikiText and friends from causing UNIQ fails

https://gerrit.wikimedia.org/r/141056
Comment 15 Nemo 2014-06-26 19:36:47 UTC
Approved by Nikerabbit and translatewiki.net didn't explode.

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


Navigation
Links