Closed Reasno closed 7 years ago
There currently seem to be more issues with having the dependency specified upon install than without. See https://github.com/SemanticMediaWiki/SemanticScribunto/issues/12
I'm rather unable to see the issue here. The error only appears because Scribunto isn't loaded (using the standard MW approache) because it doesn't make sense for this extension to be used if the required extension isn't loaded or activated in the first place.
The check (as indicated below) is only executed after the LocalSettings.php
has been loaded (event wgExtensionFunctions
) therefore for the installation the check itself isn't executed.
If you follow the standard instructions then:
LocalSettings.php
)Should not cause any issue.
Error: Semantic Scribunto requires Scribunto, please enable or install the extension first
https://github.com/SemanticMediaWiki/SemanticScribunto/blob/master/SemanticScribunto.php#L91-L94
The Installer.php
notes:
"... want here is $wgHooks['LoadExtensionSchemaUpdates']. This won't work if the extension has hidden hook registration in $wgExtensionFunctions, but we're not opening that can of worms ..."
As for the loading sequence: WebStart.php
loads:
LocalSettings.php
and after thatSetup.php
which calls wgExtensionFunctions
There currently seem to be more issues with having the dependency
Well, we can't make this a real dependency because no one cares to make it a real release, all we have is some pseudo REL* tags that are neither standard nor comply with semver.
I set up a fresh wiki with core 1.27.1, installed Scribunto (as explained in https://www.mediawiki.org/wiki/Extension:Scribunto#Manual_installation), then SMW and SSC via composer. Works for me.
Note: I load Scribunto via
require_once "$IP/extensions/Scribunto/Scribunto.php";
Also, I have lua sandbox installed.
I will try with a core 1.28 next
Edit: Same with clean install of core 1.28. Cannot reproduce the problem. SSC loads correctly. Sry.
Edit: Same with clean install of core 1.28. Cannot reproduce the problem. SSC loads correctly. Sry.
Thanks.
For a single codebase with multiple localsettings.php (wiki farm) setup however, this is an issue. Composer packages are always loaded before LocalSettings.php.
Setup and configuration
Issue
Scribunto extension must be registered in LocalSettings.php, thus it is not available during installation process. Meanwhile during installation all composer managed extensions are loaded.
SemanticScribunto then complaints:
Error: Semantic Scribunto requires Scribunto, please enable or install the extension first
I do know this is a very minor issue, but simply adding a installer check can help us who may want to reinstall mw or those who work on multiple wikis.
Thanks!