Page MenuHomePhabricator

{{DISPLAYTITLE: ... }} not honored.
Closed, ResolvedPublic

Description

I tried to use {{DISPLAYTITLE: ... }} for a test of its behaviour,
i.e. without wanting to safe a page, in the English Wikipedia.

Inserting {{DISPLAYTITLE: ... }} in an arbitrary page and
inspecting it's preview did not achieve anything.

Assuming that, DISPLAYTITLE might only be working when an
existig page is rendered, I inserted it in the page Wikipedia:Sandbox
but found, it influences neither the preview not the saved version
of the page.

I suggest that, also page preview should honor {{DISPLAYTITLE: ... }}


Version: 1.16.x
Severity: normal

Details

Reference
bz24587

Event Timeline

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

Which display title did you try on which page? enwiki has $wgRestrictDisplayTitle = true; set, which means you can only use display titles that normalize to the actual title. So {{DISPLAYTITLE:iPod}} works on [[IPod]] because [[iPod]] also links to [[IPod]] after normalization, and {{DISPLAYTITLE:WiKiPeDiA:sandbox}} should work on [[Wikipedia:Sandbox]] because [[WiKiPeDiA:sandbox]] links to [[Wikipedia:Sandbox]] after normalization, but {{DISPLAYTITLE:Foobar}} or even {{DISPLAYTITLE:Wikipedia:SAndbox}} will not work on [[Wikipedia:Sandbox]] unless unrestricted display titles are enabled.

Have you turned on displaytitle so that it an work?

(In reply to comment #3)

Have you turned on displaytitle so that it an work?

The bug is being reported against enwiki, not his own wiki, so yes, displaytitle is enabled.

onecountry wrote:

*** This bug has been marked as a duplicate of bug 24342 ***

(In reply to comment #5)

> *** This bug has been marked as a duplicate of bug 24342 ***

(In reply to comment #7)

> *** Bug 24587 has been marked as a duplicate of this bug. ***

Bug 24342 may be related but isn't a true duplicate of this bug: Other versions involved, and behaviours differ. Bug 24342 says, previews were honoring DISPLAYTITLE, while this bug says, they weren't.

Purodha Blissenbach: I tested this on en wikipedia, and it seems to work for me. I'm not exactly sure what you did, here's what I did:

*went to http://en.wikipedia.org/w/index.php?title=Fooe&action=edit (random non-existant page)
*wrote: {{DISPLAYTITLE:f<span style="color:aqua">o</span>''o''e}} on the page
*Hit preview.

Observed behaviour was that the displayed title was as i specified (as expected). Is there anything different you did in your test?

larsen007 wrote:

I can reproduce this bug:

  1. Start editing a new page "Test"
  2. Insert {{DISPLAYTITLE:this will not be displayed}}
  3. Click on "Show preview"

--> Title is "Test" instead of "this will not be displayed"

Tested with my own wiki:

  • MediaWiki 1.16.2
  • $wgAllowDisplayTitle = true;
  • $wgRestrictDisplayTitle = false;

After saving, the correct title is displayed.

@Purodha: What exactly did you try? Which title did you use?

Larsen: you are running 1.16.2 compared to 1.17 which is what en.wikip is running....

This might of been fixed by the recent updates to 1.17

larsen007 wrote:

You´re right: Just installed 1.18 (phase3-nightly-r85104.tar.gz) in a VM and the bug I noticed is fixed in that version.