ProfessionalWiki / Network

MediaWiki extension for adding interactive network visualizations to your wiki pages
https://professional.wiki/en/news/mediawiki-page-network
Other
26 stars 9 forks source link

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

Open cicalese opened 3 years ago

cicalese commented 3 years ago

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 commented 3 years ago

Uhh, two downsides to that specific change:

Can probably work around that with some more effort

cicalese commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Would this be solved in a 2.0 release? https://github.com/ProfessionalWiki/Network/pull/51

cicalese commented 3 years ago

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 commented 3 years ago

As long as 1.35 is supported, I am fine with this. 1.35.3 ist the latest LTS release, so for security reasons, everbody should upgrade