Use of {{DISPLAYTITLE|xyz}} renders blank title (<title></title>)
Closed, ResolvedPublic

Description

Author: webboy

Description:
When using {{DISPLAYTITLE|xyz}}, <h1>Main Page</h1> becomes <h1>xyz</h1>, but
<title>Main Page - TestWiki</title> becomes <title></title>


Version: 1.7.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz6253
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz6253.
bzimport created this task.Jun 9 2006, 4:06 PM
brion added a comment.Jun 9 2006, 8:45 PM

DISPLAYTITLE is fatally broken and will likely be removed or
rewritten.

ui2t5v002 wrote:

(In reply to comment #1)

DISPLAYTITLE is fatally broken and will likely be removed or
rewritten.

Rewritten, please. It's sorely needed.

There are now javascript hacks in Common.js to implement the same functionality,
but it would be better if it were done in Mediawiki itself.

webboy wrote:

Patch to fix bug 6253

In this patch I:

  • Removed parsing of the given title, since the title is always escaped.
  • Hid the text "(Link to this page as $1)" when the given title equals the real

title

  • Altered OutputPage::addParserOutputNoText() to set both $mPagetitle (<h1>)

and $mHTMLtitle (<title>) (actual fix)

Both OutputPage::$mPageLinkTitle and $this->data['displaytitle'] (MonoBook.php)
are not used before and after this patch and should probably be removed.

Attached: bug6253.patch

robchur wrote:

Fixed back in r23393.

Add Comment