Page MenuHomePhabricator

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

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:18 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz6253.
bzimport added a subscriber: Unknown Object (MLST).

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:

robchur wrote:

Fixed back in r23393.