Page MenuHomePhabricator

Categories placed in MediaWiki:Subjectpageheader appear to categorize all pages, but don't actually do so
Open, Needs TriagePublicBUG REPORT

Description

(This also applies to MediaWiki:Talkpageheader.)

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

  • In a test wiki, create the page [[MediaWiki:Subjectpageheader]] (which was added this summer with T151682) with the wikitext content [[Category:All pages]]
  • Go to any other subject page (for talk pages, there') in your test wiki. To be safe, you should also try to edit some and create some new ones.
  • Finally, visit the category and see which pages it contains

What happens?:

  • Every page appears to be categorized into Category:All pages – specifically, the category appears in the bottom category list along with any other categories that are on the page
  • However, when you visit the category, the only page that is in it is MediaWiki:Subjectpageheader.
  • Bonus: On the MediaWiki:Subjectpageheader page, the category appears in the list on the bottom twice

What should have happened instead?:

  • Either the category shouldn't appear in the category list at the bottom of pages, or all pages should actually be categorized.

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

Event Timeline

I would really like categorization to be implemented properly here. Hrwiki relies on this MW page to show draft notices, protection padlocks and other dynamic content. We had to implement a new bot only to categorize these pages. Having categories displayed dynamically would be a huge help.

Categorization doesn't work because subjectpageheader is used as an *interface* message. For it to work, the message will have to be added into the parser output (like with scribunto-doc-page-show). There are other things that will change by doing that:

Interface messageAs part of parser output
Language of displayUser languageContent language
Caching of parsed messageCDN cache only. Re-parsed on every page view by logged-in users (views by anons use CDN cache)CDN cache + parser cache. Re-parsed only when page is edited or purged.
Recording of categories, links, templates, page properties (like DEFAULTSORT), external linksDoesn't workWorks
Use of functions like {{PAGENAME}}WorksWorks
Use of TempateStylesDoesn't work unless you manually wrap the message in .mw-parser-outputWorks
What happens when the message is edited?Reflected on all pages immediatelyNot reflected on any page unless it is edited or purged
What happens when very expensive templates or parser functions are added in the message?Site immediately becomes slows for logged-in users. For anons, page views can be slow on cache misses.Slowdown only occurs on edits and purges.
What happens when a link/template/category is unconditionally added to the message?Nothing badTens of milions of new rows in the link table