This assumed parser bug causes UNIQ tags to remain unsubstituted, and hence to be exposed to the user. This happens when an extension hooking to "InternalParseBeforeLinks" accesses a message that contains {{SITENAME}}. I could reproduce this on MediaWiki 1.13alpha (r36226) to 1.14alpha (r38131), even without any extensions enabled. The conditions for creating this bug are complex, but it still occurs in practice (e.g. Semantic MediaWiki hooks to this place and uses messages). Its complicated conditions make it somewhat hard to track for the user.
To reproduce:
- Edit LocalSettings.php to include the following lines:
$wgHooks['InternalParseBeforeLinks'][] = 'causeBug'; function causeBug() { wfMsgForContent('copyrightwarning2'); return true; }
(the message 'copyrightwarning2' could be anything with {{SITENAME}} in it)
- Create a page containing the text "<nowiki>[[Test]]</nowiki>"
- Log out from the wiki, and purge the cache of the freshly created page (add action=purge as a parameter to the URL).
As a result, the UNIQ tag becomes visible. This does neither happen if anonymous users edit the page or preview their edits, nor if a logged in user edits or purges the page. The problem is also not present if a message without {{SITENAME}} in it is used.
The problem can be viewed at http://sandbox.semantic-mediawiki.org/wiki/UNIQ_bug (this wiki uses the above patch to LocalSettings). The installed extensions there do not have an effect -- disabling them still leaves the bug.
Note that this is not the same as Bug 14562, but it might of course be related internally.
Version: 1.13.x
Severity: major