Last modified: 2014-04-25 05:24:10 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 T58167, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56167 - Transcluded Special:RecentChanges and Special:RecentChangesLinked can leave strip markers and overridden title
Transcluded Special:RecentChanges and Special:RecentChangesLinked can leave s...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.22.0
All All
: Unprioritized normal (vote)
: ---
Assigned To: Umherirrender
:
: 63715 (view as bug list)
Depends on:
Blocks: UNIQ
  Show dependency treegraph
 
Reported: 2013-10-25 15:33 UTC by Umherirrender
Modified: 2014-04-25 05:24 UTC (History)
8 users (show)

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


Attachments

Description Umherirrender 2013-10-25 15:33:53 UTC
Some special pages using OutputPage::wrapWikiMsg (or similar) to add a message, for example when there is no result.

When that special page (for example Special:RecentchangesLinked) get transcluded and there is no result, the whole page shows QINU and has the special page name as title, see the screenshot from a user on dewiki[1][2]

This is happen, because OutputPage::wrapWikiMsg calls OutputPage::addWikiText calls OutputPage::addWikiTextTitle and that finally calls Parser::parse which results in a recursively call of that method and that is not a good idea(CommentDoc contains a note "Do not call this function recursively.")

This means the special page transclusion must be delayed to the end of the parse or reset $wgParser to a own/new parser object)

Is there a idea to avoid that the strip markers are shown, when a special page shows no result? That always annoying users on dewiki.

[1]https://de.wikipedia.org/wiki/Datei:Screenwikibug.png
[2]https://de.wikipedia.org/wiki/Datei:Screenwikibug02.png
Comment 1 Liangent 2013-10-25 15:43:00 UTC
First, it's the special page's fault not to use recursiveTagParse() correctly here: Special:RecentchangesLinked needs to be fixed now. See [[mw:Manual:Special pages]].

Second, I wonder whether there's any valid use case to call parse() recursively. If not, can't we check whether parse() is called recursively at the beginning of parse, and throw an exception when so, or to create less fatals, issue a warning, so people can find mistakes easier?
Comment 2 Umherirrender 2013-10-25 16:12:17 UTC
Okay, I will submit a patch to change two calls on Special:RecentChanges and Special:RecentChangesLinked.

Thanks for the hint.
Comment 3 Gerrit Notification Bot 2013-10-25 16:45:58 UTC
Change 91889 had a related patch set uploaded by Umherirrender:
Avoid strip markes on transcluded Special:RecentChanges[Linked]

https://gerrit.wikimedia.org/r/91889
Comment 4 Bartosz Dziewoński 2013-10-26 12:05:57 UTC
It sounds like we should instead fix wrapWikiMsg() instead to me (possibly making it not parse the result – I don't recall any usages of it that would actually need parsing, it's always just HTML wrapper).
Comment 5 Gerrit Notification Bot 2013-10-31 10:47:01 UTC
Change 91889 merged by jenkins-bot:
Avoid strip markes on transcluded Special:RecentChanges[Linked]

https://gerrit.wikimedia.org/r/91889
Comment 6 Andre Klapper 2014-04-25 05:24:10 UTC
*** Bug 63715 has been marked as a duplicate of this bug. ***

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


Navigation
Links