Closed octfx closed 7 months ago
@Seb35
We got the same log spam as well with MW 1.39.5:
Seems to be related to: https://phabricator.wikimedia.org/T273261 and https://phabricator.wikimedia.org/rMW47bb958f039c8f1b155c1699d31b4f882d8ba310
Would it be possible to register the hooks in onExtensionFunction
or on extension.json
instead? That should avoid the premature access from the log that is introduced since MW 1.37.
I can also confirm this.
Me too in MW 1.39.6
Thanks @Sophivorus for the fix.
I would just like to add that the issue has a potentially greater impact than simply overwhelming the logs. In my case, it also threw a SyntaxError in the browser's console (relating to a stray angle bracket) and disabled certain Bootstrap components such as dropdowns that come with the Chameleon skin. An unfortunate side-effect but one can be remedied using Sophivorus's fix.
I assume this issue is done. The related commit should be in 4.1.3. Please reopen if there is still an issue.
The commit actually post-dates the latest release (v4.2.0), which should probably be avoided. Anyway, the important thing now is that it's part of master.
Ah, this is SRF. Indeed, it has not been released yet.
Hei @kghbln , I am still seeing the following log msgs in a new MW+SMW installation.
They are gone when a deactivate SRF extension.
Deprecated: Premature access to service container [Called from SemanticResultFormats::registerHooks in /var/www/html/wiki/extensions/SemanticResultFormats/SemanticResultFormats.php at line 56] in /var/www/html/wiki/includes/debug/MWDebug.php on line 386 Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /var/www/html/wiki/includes/MediaWikiServices.php at line 339] in /var/www/html/wiki/includes/debug/MWDebug.php on line 386 Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/wiki/includes/ServiceWiring.php at line 844] in /var/www/html/wiki/includes/debug/MWDebug.php on line 386 Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/wiki/includes/ServiceWiring.php at line 860] in /var/www/html/wiki/includes/debug/MWDebug.php on line 386
I'm seeing the following log spam with MW 1.39.5
This seems to be introduced by #792