Topic on Project:Support desk

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

13
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?

Tenbergen (talkcontribs)

I finally managed to track it down to Semantic Mediawiki - when I disable that, the errors go away. I have started a ticket with them.

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. OK, I have enabled Vector on my wikis and set it to default. Still getting these errors. So, likely not just a Monobook think after all.

Pokapoww (talkcontribs)

Same problem here with php 7.4.27 and mediawiki 1.36.3.

178.254.128.122 (talkcontribs)

Hello guys! I'm trying to install the "Bluelib" skin, but this error appears:

Deprecated: Template directory should be relative to skin or omitted. [Called from ExtensionProcessor::extractInfo in C:\xampp\htdocs\mediawiki\includes\registration\ExtensionProcessor.php at line 197] in C:\xampp\htdocs\mediawiki\includes\debug\MWDebug.php on line 375

What should I do?

Please, someone help me

Balloonhead666 (talkcontribs)

Have the same problem with the same error messages and paths. Upgraded from 1.34 to 1.37.2

Malyacko (talkcontribs)
Reply to "Upgrading to 1.36 leads to several "Deprecated: Premature access to service ..." issues."