Page MenuHomePhabricator

DISPLAYTITLE of a page not applied on the page itself for page title and category headers
Open, LowPublic

Description

Categories do not use the specified {{DISPLAYTITLE:}} everywhere where appropriate, e.g. in the various category headers and page titles (<h1> and <title>):

  • Page title of edit (action=edit, {{int:editing}}) and history pages (action=history, {{int:history-title}}) for categories and other page

See also T26139: Use display title from page_props as the displayed title everywhere (tracking), which is related to how the DISPLAYTITLE of page A affects page ¬A, while this report is about the appearance of the title of page A on page A itself (?title=A, ?title=A&action=edit, ?title=A&action=history).


URL:

Details

Reference
bz41720

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:08 AM
bzimport added a project: MediaWiki-Categories.
bzimport set Reference to bz41720.
bzimport added a subscriber: Unknown Object (MLST).
Patrick87 created this task.Nov 3 2012, 1:59 AM

related: bug 17212, bug 24139

Note: this is more an enhancement request so to speak. The current behaviour is more or less the intended behaviour.

(In reply to comment #2)

Note: this is more an enhancement request so to speak. The current behaviour
is
more or less the intended behaviour.

On second thought, the current behaviour seems rather odd.

However, problem with doing this: The headers on the category don't use the "Category:" prefix, while the display title requires the category prefix.

ian2 wrote:

Just discovered this too. If I look at a category of chemical formulae, none of the numbers are subscripted, see:
https://en.wikipedia.org/wiki/Category:Molecular_formula_set_index_pages

It also makes it difficult to see which pages still need to have pagetitle applied.

(In reply to comment #4)

Just discovered this too. If I look at a category of chemical formulae, none
of
the numbers are subscripted, see:
https://en.wikipedia.org/wiki/Category:Molecular_formula_set_index_pages
It also makes it difficult to see which pages still need to have pagetitle
applied.

That's actually a separate bug (bug 17212 I guess). This bug is just for the headings on the category page.

(In reply to Bawolff (Brian Wolff) from comment #5)

That's actually a separate bug (bug 17212 I guess). This bug is just for the
headings on the category page.

Bug 44197 is clearer.

  • This bug has been marked as a duplicate of bug 44197 ***

Sorry, but it's not a duplicate (and it's definetly not clearer)...

Bug 44197 talks a lot about webfonts (which has nothing to do with the issue itself) and only covers one of the four aspects of this bug.

Please reopen!

(In reply to Eduard Braun from comment #7)

Bug 44197 [...] only covers one of the four aspects of this bug.

That's why it's clearer. :)

(from comment #0)

This is the same thing.

  • Edit and history pages of categories (applies to normal articles, too)

If it applies to normal pages you need another bug.

  • Links to categories in articles/media categorized in a category using

DISPLAYTITLE

As bawolff said that's bug 17212.

Yeah... go on confounding Bugzilla...

Although some of your points are valid I noticed you multiple times now closing and merging bugs in a more than questionable manner.

Fact is:

  • most people will be confused by the description of bug 44197 (the only thing that is a little clearer is the title and that's it)
  • Bug 17212 is a *totally different* bug as Bawolff said. Please *read* and *understand* bugs before closing them.
  • As long as this is resolved "duplicate" you reduced the chance of three linked issues ever being fixed for the sake of the fourth being merged with a bug with unclear description and therefore also reduced chance of getting fixed

I've understood perfectly, thanks. Bugs need to be clear for devs, that description is clearer. Anyway, if you want this to be a catch-all bug that's fine, then it's a dupe of bug 24139. Don't take it personally, I just did some dependency cleanup.

  • This bug has been marked as a duplicate of bug 24139 ***

From what you write it gets clear that you do not understand (or are not willing to admit an error).

Anyway this bug is done now (with the unnecessary discussion going on here) and I assume there will not come any more good out of it.

Therefore I'll report three new bugs as soon as I get to it, wasting time uselessly, for the sake of "dependency cleanup" how you call it. In the end you wasted my time which is something I *take* personally!

Nemo_bis renamed this task from Categories don't respect DISPLAYTITLE everywhere to DISPLAYTITLE of a page not applied on the page itself for page title and category headers.Dec 28 2015, 6:06 PM
Nemo_bis reopened this task as Open.
Nemo_bis updated the task description. (Show Details)
Nemo_bis set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 28 2015, 6:06 PM
Nemo_bis updated the task description. (Show Details)Dec 28 2015, 6:15 PM
Nemo_bis updated the task description. (Show Details)

Unduped and clarified, thanks to the helpful explanation by @Nikerabbit:

[this bug report is] about title of CATEGORY WHEN VIEWING IT
[T26139 is about how] other pages are displayed on CATEGORIES

The bug cannot be observed when $wgRestrictDisplayTitle = false, so the issue seems to be with $wgRestrictDisplayTitle itself:

Change 289650 had a related patch set uploaded (by Nemo bis):
Use display name in category page subheadings if provided

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

Change 289650 merged by jenkins-bot:
Use display name in category page subheadings if provided

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

Antigng added a subscriber: Antigng.Aug 7 2016, 6:13 AM

This change completely breaks our category subheading displaying mechanism. https://en.wikipedia.org/w/index.php?title=Category:Test&action=submit gives "Pages in category 'Editing Category:Test'", and https://zh.wikipedia.org/zh-cn/Category:2016%E5%B9%B4%E8%8B%B1%E5%9C%8B%E9%AB%94%E8%82%B2 gives "分类'分类:2016年英国体育'中的页面".

Please describe the problem instead of just giving links. It looks like the enwiki things has been changed or was not broken. Do note that my patch did not change anything on the edit page.

The namespace prefix appearing in subtitles was mentioned in the patch and is expected. It could be enhanced some way to be more flexible.

It didn't change anything on the edit page. However, it did change the subheading on the submit page, which had been "Pages in category 'Test'" before your patch was applied.

This change completely breaks our category subheading displaying mechanism.

Works for me.

https://en.wikipedia.org/w/index.php?title=Category:Test&action=submit gives "Pages in category 'Editing Category:Test'"

Do you mean in preview mode?

Do you mean in preview mode?

Yes. The subheading should be "pages in category 'Test'", instead of "pages in category 'Editing category 'Test'".

I finally understood what is the issue here. It has nothing to do zhwiki nor displaytitle, just a regression in page previews (and in those only).

Antigng added a comment.EditedAug 18 2016, 8:46 AM

Well, it has something to do with zhwiki. zhwiki uses the language converter, which converts "Category:XXX" to simplified Chinese "分类:XXX" or traditional Chinese "分類:XXX" for logged-out users, based on the location of their IP address. In your patch, this->getPrettyPageNameHtml() is called to get the subheading, and you might expect that expression

if ( $displayTitle === $this->getTitle()->getPrefixedText())

would judge if the title displayed is the same as the default. Unfortunately, when your patch works with our language converter, you will get "分类:XXX" for $this->getOutput()->getPageTitle() and "Category:XXX" for $this->getTitle()->getPrefixedText(), thus "分类:XXX" will be returned by the function without the prefix "分类" being stripped. And finally, the subheading will be "分类“分类:XXX”中的页面", instead of “分类“XXX”中的页面".

Liuxinyu970226 added a comment.EditedAug 18 2016, 9:20 AM

So I've submitted a revert patch: https://gerrit.wikimedia.org/r/#/c/305432/

Is this okay?

I am not delighted about the revert, but it is the practice for important issues to revert first and then submit again fixed. Whether this is important in that regard is not best judged by me.

For me the main issue is that (example in English) it says "Pages in category "Editing Category:Pywikibot scripts". Are you saying there is an additional issue with language converter that causes the page name be incorrect besides the additional "editing" word?

Change 305991 had a related patch set uploaded (by Nikerabbit):
Improvde page display title handling

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

My new patch should fix the reported issue, although I am unable to test it with language converter.

The patch works for me.

The patch doesn't seem to be going to be merged soon, and MW 1.28 release is soon, so I am going to merge the revert for now instead.

The patch doesn't seem to be going to be merged soon, and MW 1.28 release is soon

That's unfortunate, because it means I have to carry it as a local patch for one installation for another year or so.

So, what is the status of this patch, issue?

It is 2017 and pages maintained with a DISPLAYTITLE are still not displayed with the intended title on pages like the category or the Special:Search!

Maybe I'm missing something but I would have expected that something like [0] is handled sufficiently in MediaWiki!

[0] https://user-images.githubusercontent.com/1245473/29486982-2b54602a-852d-11e7-9066-e479ddef9593.png

https://gerrit.wikimedia.org/r/#/c/305991/ will have one year anniversary tomorrow. Reviews are welcome :) But that patch only fixes some small things as described in this task. The big thing is T26139: Use display title from page_props as the displayed title everywhere (tracking).

For example there is one very old and stuck patch for fixing the category listings: https://gerrit.wikimedia.org/r/#/c/44766/
I am quite sure there are more old and stuck patches if one spends a bit more time searching in gerrit.

Kghbln added a subscriber: Kghbln.

Change 305991 merged by jenkins-bot:
[mediawiki/core@master] Improve page display title handling for category pages

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

Jdforrester-WMF closed this task as Resolved.Sep 12 2018, 4:24 PM
Jdforrester-WMF reopened this task as Open.
Jdforrester-WMF assigned this task to Nikerabbit.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Bah, mis-click.

matmarex removed a subscriber: matmarex.Sep 12 2018, 9:25 PM
Nikerabbit removed Nikerabbit as the assignee of this task.Sep 19 2018, 8:21 AM

Removing myself as I am not working on the remainder of this task.