Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot enable namespaces listed in extension.json as excluded #21

Open
cicalese opened this issue May 9, 2021 · 6 comments
Open

Cannot enable namespaces listed in extension.json as excluded #21

cicalese opened this issue May 9, 2021 · 6 comments

Comments

@cicalese
Copy link
Collaborator

cicalese commented May 9, 2021

extension.json includes:

"PageNetworkExcludedNamespaces": { "value": [ 2, 4, 8, 12 ] },

However, arrays defined in extension.json can only be added to (there isn't much documentation for this, but you can see
https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#Merge_strategies). So, it is not possible to remove those four default namespaces from the exclude list. It would be better to set that to an empty array and allow site admins to add namespaces as needed.

@JeroenDeDauw
Copy link
Member

Uhh, two downsides to that specific change:

  • breaking change, needs major release
  • less good default values, requiring more work on extension installation

Can probably work around that with some more effort

@cicalese
Copy link
Collaborator Author

Good news! I discovered that a patch was created recently to fix this problem, which was also affecting another extension: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/684668. I tested and merged it, so it will be available in MW 1.37. At that point, the extension.json will need to be updated to use the provide_default merge strategy.

@cicalese
Copy link
Collaborator Author

cicalese commented May 27, 2021

The patch mentioned above was backported to the MediaWiki 1.35 and 1.36 branches, so it will be available in the 1.36 release as well as the next 1.35 point release. Once those releases are made, the "provides_default" merge strategy could be specified in extension.json, but that would break compatibility with earlier point releases of 1.35 and anything earlier.

@krabina
Copy link
Contributor

krabina commented Jul 8, 2021

Would this be solved in a 2.0 release? #51

@cicalese
Copy link
Collaborator Author

Not unless we bump the version requirement to MW 1.35.3+. The fix is not in earlier releases in the MW 1.35 branch. What are thoughts on that requirement?

@krabina
Copy link
Contributor

krabina commented Jul 10, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants