Page MenuHomePhabricator

DISPLAYTITLE not honoured in category page lists
Closed, ResolvedPublicBUG REPORT

Description

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

1.43 with DisplayTitle extension installed. For pages with DISPLAYTITLE set and a category, visit the category page

What happens?:

Page name displayed, not the DISPLAYTITLE is shown, as was done in 1.39

What should have happened instead?:

DISPLAYTITLE should be shown, presumably by the DisplayTitle extension, but possibly without.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

MediaWiki 1.43.0
DisplayTitle 4.0.3 (920768a) 07:59, 23 November 2024

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

Event Timeline

I think it is if you also use this one:

https://www.mediawiki.org/wiki/Extension:DISPLAYCAT

Ideally though, this should be fixable and fixed without hackish changes.

This is happening due to a change in an if-statement, see: https://github.com/wikimedia/mediawiki-extensions-DisplayTitle/blob/REL1_43/includes/DisplayTitleService.php#L170

In the case of category pages, the variable $html is null in the case of displaytitle links on category pages, which in turn causes the processing (i.e. checking if the page has a display title set) to stop. It was probably added to let phan tests pass (change-ID: I91af732da11c97929d1746ebba2a6a7a82eaac67), but it unfortunately has side effects.

@cicalese Do you suggest I proceed in reverting the change to the if-statement?

Change #1199759 had a related patch set uploaded (by Rrvdw; author: Rrvdw):

[mediawiki/extensions/DisplayTitle@master] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199759

Change #1199770 had a related patch set uploaded (by Cicalese; author: Rrvdw):

[mediawiki/extensions/DisplayTitle@REL1_43] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199770

Change #1199772 had a related patch set uploaded (by Cicalese; author: Rrvdw):

[mediawiki/extensions/DisplayTitle@REL1_44] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199772

Change #1199773 had a related patch set uploaded (by Cicalese; author: Rrvdw):

[mediawiki/extensions/DisplayTitle@REL1_45] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199773

cicalese claimed this task.

Change #1199759 merged by jenkins-bot:

[mediawiki/extensions/DisplayTitle@master] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199759

Change #1199773 merged by jenkins-bot:

[mediawiki/extensions/DisplayTitle@REL1_45] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199773

Change #1199770 merged by jenkins-bot:

[mediawiki/extensions/DisplayTitle@REL1_43] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199770

Change #1199772 merged by jenkins-bot:

[mediawiki/extensions/DisplayTitle@REL1_44] DISPLAYTITLE not honoured in category page lists

https://gerrit.wikimedia.org/r/1199772