Page MenuHomePhabricator

Allow extensions to specify immovable namespaces via extension.json
Closed, ResolvedPublic

Description

Currently, for extensions that add custom namespaces, if those namespaces should be immovable the only way to implement that is via the NamespaceIsMovable hook. I propose that it also be possible via extension.json when specifying namespaces, by adding a new property ismovable (defaulting to true).

The following extensions register a handler for the hook, just to say that the custom namespace added is not movable, and would benefit

  • EntitySchema (for NS_ENTITYSCHEMA_JSON)
  • Flow (for NS_TOPIC)
  • WikiLambda (for NS_ZOBJECT)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Legoktm subscribed.

It would be nice if this did not require a new global to be created and instead could be done as an attribute. Other than that, thumbs up from me.

I propose that it also be possible via extension.json when specifying namespaces, by adding a new property ismovable (defaulting to false).

There are only three namespaces with non-movable pages (per the task desc), which means the majority of namespaces are movable. So defaulting to false is not a good idea here.

Change 672725 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Allow specifying immovable namespaces in extension.json

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

I propose that it also be possible via extension.json when specifying namespaces, by adding a new property ismovable (defaulting to false).

There are only three namespaces with non-movable pages (per the task desc), which means the majority of namespaces are movable. So defaulting to false is not a good idea here.

Yeah, I meant true, sorry

Change 672725 merged by jenkins-bot:
[mediawiki/core@master] registry: Allow specifying immovable namespaces in extension.json

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

Change 672816 had a related patch set uploaded (by Legoktm; owner: Ammarpad):
[mediawiki/core@REL1_35] registry: Allow specifying immovable namespaces in extension.json

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

Change 672816 merged by jenkins-bot:
[mediawiki/core@REL1_35] registration: Allow specifying immovable namespaces in extension.json

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

Legoktm assigned this task to Ammarpad.

Change 713444 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/EntitySchema@master] Declare EntitySchema namespace as not movable

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

Change 713359 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/WikiLambda@master] Declare ZObject namespace as not movable in extension.json

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

Change 713360 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Flow@master] Declare topic namespace as not movable in extension.json

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

Change 713444 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Declare EntitySchema namespace as not movable

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

Change 713360 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Declare topic namespace as not movable in extension.json

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

Change 713359 abandoned by Jforrester:

[mediawiki/extensions/WikiLambda@master] Declare ZObject namespace as not movable in extension.json

Reason:

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