Page MenuHomePhabricator

Vector (or Vector 2022?) displays {{DISPLAYTITLE}} only when no ToC is present
Closed, ResolvedPublic


Forgive me if the title isn't quite right. I'm splitting this off from T306862#8665563 where it was reported:

see , wrong page title.

If all the sections in the article are deleted, the TOC is not generated, and the title is displayed correctly. see

related discussion:

I don't think this is actually related to the changes landed for T306862: Chinese Language Converter is not working in the sidebar table of the contents in Vector-2022 but this bears further investigation.

Event Timeline

A somewhat cleaner diff:

Which is presently the latest version, aka the same as:

But note that

(aka the "no conversion" output) seem to appear correctly.

The display title is generated by a template invocation {{全局僻字|𰚼|⿹气云}} whose expansion is:

This is a quite-complicated invocation of the -{T|...}- language converter rule, which sets the display title, followed by an -{H|...}- unidirectional rule, presumably intended to affect the result of the page (see ) and that latter rule appears to be "corrupting" the display title somehow, primarily by being a <span> tag which, instead of being stripped from the display title (9f14fbd002713abcf65a5b5cddc5d52dee90a977) is instead being HTML-escaped and included as literal text.

(T26072 is a much older but perhaps related bug, although it was apparently fixed back in 2010.)

Change 894746 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] WIP: Don't clear LanguageConverter display title when converting ToC

It turns out that this issue *is* related to T306862, via a side-effect of calling LanguageConverter::convertTo(). The linked patch above describes the situation in its commit message.

Change 894746 merged by jenkins-bot:

[mediawiki/core@master] Don't clear LanguageConverter display title when converting ToC

Shizhao claimed this task.
Shizhao added a subscriber: Shizhao.

test ok on zhwiki