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
callback 'MapsRegistration::onRegistration' is not callable on MediaWiki 1.38 #689
Comments
Could you try using the master branch, and see if that fixes the issue? I made some changes that hopefully fix it. |
Now I get: Notice: Undefined index: egMapsDisableExtension in /srv/mediawiki/w/extensions/Maps/src/MapsRegistration.php on line 12
Notice: Undefined index: egMapsGMaps3Language in /srv/mediawiki/w/extensions/Maps/src/MapsSetup.php on line 38
Notice: Undefined index: egMapsGMaps3ApiKey in /srv/mediawiki/w/extensions/Maps/src/MapsSetup.php on line 47
Notice: Undefined index: egMapsEnableCoordinateFunction in /srv/mediawiki/w/extensions/Maps/src/MapsFactory.php on line 280
[dca25ae38b70d31d61185077] [no req] TypeError: Argument 2 passed to Maps\ParserHookSetup::__construct() must be of the type bool, null given, called in /srv/mediawiki/w/extensions/Maps/src/MapsFactory.php on line 280
Backtrace:
from /srv/mediawiki/w/extensions/Maps/src/ParserHookSetup.php(23)
#0 /srv/mediawiki/w/extensions/Maps/src/MapsFactory.php(280): Maps\ParserHookSetup->__construct(Parser, NULL)
#1 /srv/mediawiki/w/extensions/Maps/src/MapsSetup.php(60): Maps\MapsFactory->newParserHookSetup(Parser)
#2 /srv/mediawiki/w/includes/HookContainer/HookContainer.php(338): Maps\MapsSetup->Maps\{closure}(Parser)
#3 /srv/mediawiki/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#4 /srv/mediawiki/w/includes/HookContainer/HookRunner.php(2872): MediaWiki\HookContainer\HookContainer->run(string, array)
#5 /srv/mediawiki/w/includes/parser/Parser.php(533): MediaWiki\HookContainer\HookRunner->onParserFirstCallInit(Parser)
#6 /srv/mediawiki/w/includes/parser/ParserFactory.php(196): Parser->__construct(MediaWiki\Config\ServiceOptions, MagicWordFactory, LanguageEn, ParserFactory, string, MediaWiki\SpecialPage\SpecialPageFactory, MediaWiki\Linker\LinkRendererFactory, NamespaceInfo, Monolog\Logger, MediaWiki\BadFileLookup, MediaWiki\Languages\LanguageConverterFactory, MediaWiki\HookContainer\HookContainer, MediaWiki\Tidy\RemexDriver, WANObjectCache, MediaWiki\User\UserOptionsManager, MediaWiki\User\UserFactory, MediaWikiTitleCodec, MediaWiki\Http\HttpRequestFactory, TrackingCategories)
#7 /srv/mediawiki/w/includes/ServiceWiring.php(1211): ParserFactory->create()
#8 /srv/mediawiki/w/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)
#9 /srv/mediawiki/w/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)
#10 /srv/mediawiki/w/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService(string)
#11 /srv/mediawiki/w/includes/MediaWikiServices.php(1366): MediaWiki\MediaWikiServices->getService(string)
#12 /srv/mediawiki/w/extensions/TreeAndMenu/TreeAndMenu_body.php(27): MediaWiki\MediaWikiServices->getParser()
#13 [internal function]: TreeAndMenu->setup()
#14 /srv/mediawiki/w/includes/Setup.php(953): call_user_func(array)
#15 /srv/mediawiki/w/maintenance/doMaintenance.php(96): require_once(string)
#16 /srv/mediawiki/w/maintenance/sql.php(236): require_once(string)
#17 {main} |
sigh MediaWiki... |
So I did some digging, and unless I'm wrong (untested) Line 78 in 2d18ff1
egMapsEnableCoordinateFunction is an undefined global (null) not a boolean, resulting in in the exception. Now this means that the default globals aren't being applied (as also evident by the other undefined index warnings). So it seems to me like https://github.com/ProfessionalWiki/Maps/blob/master/DefaultSettings.php is not being applied, which appears to be loaded from https://github.com/ProfessionalWiki/Maps/blob/master/Maps_Settings.php, however that defines to only set the globals under the condition that $egMapsAvailableServices is not set? However we do set that (a modified version of it) so does that determine to never load the settings? I can't remember for sure, but I think with 1.38, there was some change with the composer autoloader load order, so that MediaWiki functions is loaded before composer autoloader, meaning configuration would be loaded before composer I think, so before that file is ever loaded with Line 62 in 2d18ff1
|
I did confirm that not setting |
Setup
Issue
Detailed description of the issue and a stack trace if applicable:
Steps to reproduce the observation (recommendation is to use the sandbox):
Just trying to load MediaWiki on 1.38, or running any maintenance script, or any action at all.
The text was updated successfully, but these errors were encountered: