Page MenuHomePhabricator

Make the creation of CSS pages with TemplateStyles work more sensibly on the German Wikipedia
Closed, ResolvedPublic

Description

TemplateStyles was deployed to the German Wikipedia in T190910. The deployment went fine, but the creation of TemplateStyles CSS pages on the German Wikipedia is a bit awkward.

Subpages are, in a technical sense, disabled in the template namespace on the German Wikipedia; $wgNamespacesWithSubpages[NS_TEMPLATE] is set to false. It was in the first commit in the configuration, and there's no comments, so there's no clear reason why this is the case. A page like Template:Foo/styles.css is not technically a subpage of Template:Foo, but a totally separate page. This doesn't cause any real problems normally, but in the case of a page like Template:Foo/styles.css it means the content model has to be manually changed by a user who can do that, rather than the content model automatically being the correct one. It's a bit of a pain.

The most sensible way to solve this problem is probably to remove the override of $wgNamespacesWithSubpages[NS_TEMPLATE], since users of the German Wikipedia already do use subpages in the template namespace, which will mean TemplateStyles will then work more sensibly for people.

Related Objects

StatusAssignedTask
OpenNone
OpenNone
ResolvedNone
DuplicateNone
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenNone
OpenNone
Resolved Jdlrobson
DuplicateNone
DuplicateNone
OpenNone
OpenNone
StalledNone
InvalidNone
OpenNone
OpenNone
ResolvedTheDJ
ResolvedTheDJ
InvalidNone
OpenNone
ResolvedTheDJ
OpenNone
Resolved Jdlrobson
Open Jdlrobson
Open Jdlrobson
ResolvedTgr
ResolvedTgr
ResolvedTgr

Event Timeline

Tgr added a comment.Apr 6 2018, 11:54 AM

The initial config commit is from 2012 so namespaces were disabled some time before then. They are manually disabled for a bunch of wikis and manually enabled for another bunch, not sure what the story is behind that.

The list of wikis where the template namespace does not support subpages is

dewiki zh_min_nanwiki arbcom_enwiki auditcomwiki boardwiki chairwiki chapcomwiki execwiki grantswiki internalwiki nostalgiawiki plwikimedia rswikimedia wikimaniateamwiki wikimania2006wiki wikimania2007wiki wikimania2008wiki wikimania2009wiki wikimania2010wiki trwikisource viwikisource zhwikisource arwikiversity betawikiversity dewikiversity enwikiversity fiwikiversity ptwikiversity

Since we hope to eventually deploy TemplateStyles everywhere, should we reach out to these wikis and try to change the setting everywhere?

Tgr added a comment.EditedApr 6 2018, 12:51 PM

@Cirdan @MartinK @MichaelSchoenitzer any thoughts if the disabling of subpages is intentional on behalf of the German Wikipedia or some legacy thing that no one actually cares about?

AFAIK the two effects of enabling subpages are that subpage-related magic words ({{BASEPAGENAME}} etc) behave differently, and that navigation links appear on the top of the page when the parent pages exist. I don't think either is particularly problematic in the template namespace.

(Apparently template subpages defaulted to false until T147160 changed it in 2016, which suggests that having it as false in 2012 wasn't an explicit decision, just someone's way to fill out the configuration array, or maybe it was machine-generated somehow.)

It is not really obvious to me that the entire subpage mechanism is disabled for dewiki.

The common subpage navigation and magic words do work as I would expect.

The only namespace with disabled subpage mechanism is the mainspace (articles), but even article talk does provide subpage technique (which is funny when talking about the OS/2 article).

However, due to review mechanism (templates and other included pages like modules) require patrolling / released changes. That might be a reason for some special tratment, if any.

According to this help page, Templates are supposed to have subpages just like user or project pages. And indeed I also never noticed any different software treatment until recently with TemplateStyles.

Anomie added a comment.EditedApr 6 2018, 2:01 PM

(Apparently template subpages defaulted to false until T147160 changed it in 2016, which suggests that having it as false in 2012 wasn't an explicit decision, just someone's way to fill out the configuration array, or maybe it was machine-generated somehow.)

The Wikimedia configuration overrode it much earlier than 2016, as was shown in the original operations/mediawiki-config patch you linked. T11453#137882 mentions in 2011 that this was done "back then". Not sure if that refers to 2007 when that bug was originally filed or some other "back then".

But the more general point is likely correct: chances are the Wikimedia defaults were copied to fill out the array back before the Wikimedia default was changed.

It is not really obvious to me that the entire subpage mechanism is disabled for dewiki.

No one said the entire subpage mechanism was disabled for dewiki. But subpages are turned off in the template namespace there.

You can still create titles with a "/" in them in the template namespace there, but MediaWiki doesn't treat them as subpages.

However, due to review mechanism (templates and other included pages like modules) require patrolling / released changes. That might be a reason for some special tratment, if any.

Seems unlikely. Other wikis with a similar FlaggedRevs configuration don't seem to have subpages disabled in the template namespace.

According to this help page, Templates are supposed to have subpages just like user or project pages.

Apparently that doc page is incorrect.

And indeed I also never noticed any different software treatment until recently with TemplateStyles.

Try using {{BASEPAGENAME}} on a "subpage" in the Template namespace for one example of a difference.

IMHO there is nothing to be said against enabling subpages in de.Wiki, since they are already widely used in the Template-Namespaces anyhow – including but not limited to the documentation pages under "xy/Doku".

Oh, indeed.

When that help page or the related material has been created, the subpage mechanism was active for template namespace. Nobody ever noticed that it was gone. No idea what happened in which decade.

We are navigating by documentation pages, not by the generated upwards link on top of the page. Therefore that link was never required, and not missing for work.

Change 432587 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[operations/mediawiki-config@master] Remove $wgNamespacesWithSubpages overrides for NS_TEMPLATE

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

Tgr added a comment.May 11 2018, 2:47 PM

The patch above will enable subpages in the template namespace for all wikis where it is currently disabled: dewiki, zh_min_nanwiki, arbcom_enwiki, auditcomwiki, boardwiki, chairwiki, execwiki, grantswiki, internalwiki, nostalgiawiki, plwikimedia, rswikimedia, wikimaniateamwiki, wikimania2006wiki, wikimania2008wiki, wikimania2009wiki, wikimania2010wiki, trwikisource, viwikisource, zhwikisource, arwikiversity, betawikiversity, dewikiversity, enwikiversity, fiwikiversity, ptwikiversity.

To the extent it was possible to tell from git history, none of those settings were intentional. Until 2013 the settings were stored as full dumps of all namespaces, and Template defaulted to no subpages; when that default was changed the old setting got stuck in a number of places. There have been a number of one-off changes since then to enable template subpages on some wiki or other; I haven't found any case of someone disabling them for some wiki.

Nevertheless, it's possible if unlikely that the change will break something and require templates using {{BASENAME}} or similar magic words to be updated. @Deskana could we get a warning out to the wikis that are going to be affected?

I took a first quick look into template documentation templates on German Wikipedia, but they seem to be safe against the change. I failed to imagine other places which might be affected.

They use {{#titleparts:}} and are just counting slashes, whether or not the page is existing and the namespace exists or has the subpage attribute. Even {{#rel2abs:{{FULLPAGENAME}}/..}} works here pretty well since 2009.

Almost every subpage is equipped with a documentation template, which is maintained and ensured by tools. A few pages are created then and when, but identified and remedied in maintenance process.

Change 432587 merged by jenkins-bot:
[operations/mediawiki-config@master] Remove $wgNamespacesWithSubpages overrides for NS_TEMPLATE

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

Tgr closed this task as Resolved.EditedJun 6 2018, 8:54 AM

Subpages have been enabled in the template namespace for all wikis. I'll send a MassMessage to the affected 'pedias, 'sources and 'versities; the rest are either not publicly writable or not actively used, and probably too small to care about this change.

CKoerner_WMF rescinded a token.
Deskana moved this task from Doing to Done on the TemplateStyles board.Aug 9 2018, 11:40 AM