Page MenuHomePhabricator

Allow creation of TemplateStyles in the Module namespace
Closed, ResolvedPublic

Description

The use case in this case is the CS1 set of templates. There are at this point some dozen or two of the core templates and then several hundred derivatives calling those main templates (usually).

Rather than store the TemplateStyles on some random template page, it would be useful to store the TemplateStyles in a subpage of the core module, which is presently Module:Citation/CS1. What Trappist the monk has done (not likely knowing better but clearly getting to the Answer That Works) was this history of that style page. That workflow doesn't seem ideal.

Related Objects

Event Timeline

Anomie subscribed.

Using Special:ChangeContentModel, as seems to be what was done at the linked page, isn't a bad workflow.

OTOH, there's no real reason not to add NS_MODULE to $wgTemplateStylesNamespaces either.

OTOH, there's no real reason not to add NS_MODULE to $wgTemplateStylesNamespaces either.

For enwiki, or in general?

In T200914#4514401, @Tgr wrote:

OTOH, there's no real reason not to add NS_MODULE to $wgTemplateStylesNamespaces either.

For enwiki, or in general?

The task was meant to be 'in-general', for all the same reasons we made TemplateStyles.

Using Special:ChangeContentModel, as seems to be what was done at the linked page, isn't a bad workflow.

It is if you are not an admin.

In T200914#4514401, @Tgr wrote:

OTOH, there's no real reason not to add NS_MODULE to $wgTemplateStylesNamespaces either.

For enwiki, or in general?

In general.

In T200914#4514464, @Izno wrote:

Using Special:ChangeContentModel, as seems to be what was done at the linked page, isn't a bad workflow.

It is if you are not an admin.

Hmm, I didn't notice that content model changes were "temporarily" restricted to admins on Wikimedia wikis. See T85847: Grant editcontentmodel right to all logged in users.

Hmm, I didn't notice that content model changes were "temporarily" restricted to admins on Wikimedia wikis. See T85847: Grant editcontentmodel right to all logged in users.

😃

Change 467123 had a related patch set uploaded (by MGChecker; owner: MGChecker):
[operations/mediawiki-config@master] Allow creation of TemplateStyles in Module namspace

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

Change 467123 abandoned by MGChecker:
Allow creation of TemplateStyles in Module namspace

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

Change 468316 had a related patch set uploaded (by MGChecker; owner: MGChecker):
[mediawiki/extensions/TemplateStyles@master] Allow extensions to register additional namespaces in extension.json

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

Change 468317 had a related patch set uploaded (by MGChecker; owner: MGChecker):
[mediawiki/extensions/Scribunto@master] Set "TemplateSandboxEditNamespaces" in extension.json

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

Change 468316 merged by jenkins-bot:
[mediawiki/extensions/TemplateStyles@master] Allow extensions to register additional namespaces in extension.json

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

@Johan, hello!:) Can you write anything about this update in the Tech News?

@Iniquity I'll take a look at it when I sit down to write Tech News for next week on Wednesday or Thursday. (:

(But, as @Aklapper points out, it's safer to add something to https://meta.wikimedia.org/wiki/Tech/News/Next yourself, or add the user-notice tag, than to ping me, in case I'm e.g. travelling and someone else is writing Tech News that week.)

Change 468317 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] Set "TemplateSandboxEditNamespaces" in extension.json

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

The change should be deployed to Wikimedia wikis with 1.33.0-wmf.14 or later.