Topic on Project:Support desk

Jump to navigation Jump to search

Upgrading to 1.36 leads to several "Deprecated: Premature access to service ..." issues.

8
Summary by Ciencia Al Poder
Rasputin1493 (talkcontribs)

Hello, I've encountered an issue that I'm not getting solved on my own after upgrading from 1.35.2 to 1.36. Following text can be seen on the background of any page on the whole wiki:

Deprecated: Premature access to service container [Called from ConfigFactory::getDefaultInstance in /www/w/includes/config/ConfigFactory.php at line 52] in /www/w/includes/debug/MWDebug.php on line 376

Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /www/w/includes/MediaWikiServices.php at line 252] in /www/w/includes/debug/MWDebug.php on line 376

Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /www/w/includes/ServiceWiring.php at line 535] in /www/w/includes/debug/MWDebug.php on line 376

Deprecated: Premature access to service 'ConfigFactory' [Called from ConfigFactory::getDefaultInstance in /www/w/includes/config/ConfigFactory.php at line 52] in /www/w/includes/debug/MWDebug.php on line 376

Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /www/w/includes/ServiceWiring.php at line 277] in /www/w/includes/debug/MWDebug.php on line 376

Deprecated: Use of $wgParser was deprecated in MediaWiki 1.32. [Called from require_once in /www/w/includes/Setup.php at line 838] in /www/w/includes/debug/MWDebug.php on line 376

https://rammwiki.net/wiki/Special:Version

MediaWiki 1.36.0
PHP 7.4.13 (cgi-fcgi)
MariaDB 10.3.23-MariaDB-0+deb10u1
Rasputin1493 (talkcontribs)

Okay, so typing in error_reporting( 0 ); in my LocalSettings.php right underneath <?php solved it.

Rasputin1493 (talkcontribs)

However, these errors are obviously not gone and affect the functionality of the wiki big time.

So how to fix that?

Tenbergen (talkcontribs)

Having lots of deprecated errors like that in my logs as well after updating to 1.36.0. Did you end up getting a solution, Rasputin1493?

TiltedCerebellum (talkcontribs)

Per the sidebar on this wiki page, you might need to turn on detailed debugging and give more complete error messages with stack trace for folks to be able to help you determine what's going wrong. Usually the full stack trace gives them much more info.

Manual:How to debug

78.60.90.53 (talkcontribs)

Same here, we just started using MediaWiki 1.36.0 fresh install

Tonynando (talkcontribs)

I experienced it trying to use Monobook, Timeless and Splash skins, but it seems this bug happens in a lot of situations.

  • Here it was related to EmbedVideo extension.
  • Here the bug happened using ArticleRatings extension
Tenbergen (talkcontribs)

That's interesting. I am using Monobook exclusively as well. And now that you say it... I tried to download a beta version a few weeks ago and had to disable Monobook to make it work at all. Didn't have time to fuss with it further then, so never installed it on my test system.

Reply to "Upgrading to 1.36 leads to several "Deprecated: Premature access to service ..." issues."