Semanticmediawiki: Add method to toggle off "installed but not enabled" message.

Created on 24 Apr 2020  路  9Comments  路  Source: SemanticMediaWiki/SemanticMediaWiki

Setup and configuration

  • SMW version: 3.1.5
  • MW version: 1.34.1
  • PHP version: 7.2.24-0ubuntu0.18.04.4 (fpm-fcgi)
  • DB system (MySQL, Blazegraph, etc.) and version: MySQL 5.6.10 (AWS Aurora)

Issue

I have four SMW-enabled wikis and three that are not. In testing to unify all wikis to use a single copy of Mediawiki in a "wiki family" architecture, a banner message about SMW being installed but not enabled appears on the Special:Version page when the extensions have been installed via composer.local.json in the non-Semantic wikis. It would be nice to have a way to toggle that off, for example adding a new $smwg boolean variable or even just adding value to the div element's class attribute that could be targeted in the site CSS to hide the div.

https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/3.1.x/src/MediaWiki/Hooks/BeforePageDisplay.php#L43

usability

Most helpful comment

appears on the Special:Version page when the extensions have been installed via composer.local.json in the non-Semantic wikis. It would be nice to have a way to toggle that off, for example adding a new

4170 and [0] contains all the relevant information.

[0] https://www.semantic-mediawiki.org/wiki/Extension_registration

All 9 comments

Probably the message itself should include "you can disable this by adding code snippet to LocalSettings.php".

appears on the Special:Version page when the extensions have been installed via composer.local.json in the non-Semantic wikis. It would be nice to have a way to toggle that off, for example adding a new

4170 and [0] contains all the relevant information.

[0] https://www.semantic-mediawiki.org/wiki/Extension_registration

Apologies if I'm missing something, but the documentation seems to be unclear or incomlete on what all is required to enable the variable to suppress the warning. If I just add $smwgIgnoreExtensionRegistrationCheck = true; to my LocalSettings.php, the warning message remains, but it does go away if I instead change the default value in the SMW DefaultSettings.php file. OTOH, the docs for the variable say to put the setting after the enableSemantics() call, but a non-SMW wiki shouldn't need to call that function. Indeed, if I do call it first, then I get an error page about a missing upgrade key. Please let me know if I'm missing something obvious.

In other words: You did the following and it did not work?:

enableSemantics( 'example.org' );
$smwgIgnoreExtensionRegistrationCheck = true;

Correct, that is exactly what I did.

Perhaps this works like $smwgNamespaceIndex, i.e.

$smwgIgnoreExtensionRegistrationCheck = true;
enableSemantics( 'example.org' );

Apart from that I have no idea either.

I still get the same error doing it that way.

https://i.imgur.com/GJgvVvk.png

Perhaps I'm misreading things here, but why are you calling enableSemantics for wikis where SMW should not be enabled?

Perhaps I'm misreading things here, but why are you calling enableSemantics for wikis where SMW should not be enabled?

I didn't think it should be called, so I didn't have it the first time I tested setting the variable. After that didn't work and I read the variable's documentation again, where it says to put it after the call in the Changing the default setting section, even though that didn't seem right, I tried adding the call anyway, just to see if it made a difference, which it didn't (other than resulting in the upgrade key error I showed in my last reply).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JeroenDeDauw picture JeroenDeDauw  路  3Comments

plegault3397 picture plegault3397  路  3Comments

Larivact picture Larivact  路  4Comments

mwjames picture mwjames  路  3Comments

WolfgangFahl picture WolfgangFahl  路  3Comments