Page MenuHomePhabricator

DISPLAYTITLE not working on English Wiktionary (due to local template)
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • see [[wikt:M🜨]]. The code {{DISPLAYTITLE:''M''<sub>🜨</sub>}} is included in the article.

It is not fixed if I remove either the italic or the subscript marking.

What happens?:

There is no effect for me, nor for user Erutuon, who confirmed the problem and said it was a bug: "MediaWiki thinks it has an effect in that if you add a second display title after that one, it says you've overridden the display title. So somehow the display title is not actually being applied." (See their talk page on wikt-en.)

What should have happened instead?:

In the title, the M should be italic and the 🜨 subscript.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Firefox for Linux Mint 110.0.1 (64-bit) for me; no idea for user Erutuon.

Event Timeline

Hi — it looks like this is being caused by the head template ({{head|mul|symbol|head=''M''<sub>🜨</sub>}}). Removing that template and previewing the page shows the expected page title formatting

Glad to see you've managed to resolve the problem :-)

Aklapper renamed this task from DISPLAYTITLE not working on Wikt-en to DISPLAYTITLE not working on English Wiktionary (due to local template).Mar 20 2023, 1:25 PM
Aklapper changed the task status from Declined to Invalid.

The explanation is that the display title {{DISPLAYTITLE:''M''<sub>🜨</sub>}} was placed before the {{head|mul|symbol|head=''M''<sub>🜨</sub>}} template, and the module (Module:headword ) invoked by the template provided a conflicting display title <span class="Latn">M🜨</span> in Lua (frame:callParserFunction("DISPLAYTITLE", display_title)). The module gets a return value that is a warning that renders like Warning: Display title "<i>M</i><sub>🜨</sub>" overrides earlier display title "<span class="Latn">M🜨</span>"., but doesn't print it. It probably should.

I gather the warning is text emitted by the parser function so that you can tell what wikitext triggered the warning, but it would be nice if the warning were visible elsewhere or the page were put in a category so that display title problems can be more easily located and debugged. I can change the module to print the warning, but there's no way to tell how many pages will display warnings after I do that.

I think a category would be a good solution. The category would have to be added by the parser and not by the wikitext of the message, to track cases where the warning is generated but isn't shown by a template. However, even with a category, it would sometimes be hard to find which templates actually changed the display title, generated a warning, and didn't display the warning. I am not sure what the solution would be for that.

Incidentally there does not seem to be a MediaWiki message page that I can edit to change the message (uselang=qqx version of the a revision with the error).