Topic on Project:Support desk

MediaWiki runtime error:: No such service: HookContainer

6
Ewaszkow (talkcontribs)

I have installed the very latest mediawiki 1.38.2 and I am running PHP version 8.0.13 under RedHat Linux 9. When I try to run MediaWiki on any brower AND when I try to run php update.php in the /maintenence directory, I get the following error.


PHP Fatal error:  Uncaught Wikimedia\Services\NoSuchServiceException: No such service: HookContainer in /export/mediawiki-1.38.2/vendor/wikimedia/services/src/ServiceContainer.php:468

Stack trace:

#0 /export/mediawiki-1.38.2/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()

#1 /export/mediawiki-1.38.2/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()

#2 /export/mediawiki-1.38.2/includes/MediaWikiServices.php(1024): MediaWiki\MediaWikiServices->getService()

#3 /export/mediawiki-1.38.2/includes/MediaWikiServices.php(282): MediaWiki\MediaWikiServices->getHookContainer()

#4 /export/mediawiki-1.38.2/includes/exception/MWExceptionHandler.php(130): MediaWiki\MediaWikiServices::getInstance()

#5 /export/mediawiki-1.38.2/includes/exception/MWExceptionHandler.php(201): MWExceptionHandler::rollbackPrimaryChangesAndLog()

#6 /export/mediawiki-1.38.2/includes/exception/MWExceptionHandler.php(170): MWExceptionHandler::handleException()

#7 [internal function]: MWExceptionHandler::handleUncaughtException()

#8 {main}

  thrown in /export/mediawiki-1.38.2/vendor/wikimedia/services/src/ServiceContainer.php on line 468


PLEASE HELP.

Bawolff (talkcontribs)
Ewaszkow (talkcontribs)

YES... all errors are ON.

I added the following to /etc/php.ini and LocalSettings.php

ini_set( 'display_startup_errors' , 1 );

ini_set( 'display_errors, 1 );

error_reporting ( -1 );


The same errors I pasted above are showing up in my console window as well as in the web browser when I try to access my wiki.


What specifically should I be looking for? Another log file somewhere?

Bawolff (talkcontribs)
Ewaszkow (talkcontribs)

I did find the error log file and it contains the very same error I have pasted above.

I don't know much about the /vendor/wikimedia/services / ServiceContainer.php and HookContainers.. is there a way I can reinstall this? Can this be installed individually or is this part of the core mediawiki package?

Bawolff (talkcontribs)

You can reinstall anything in the vendor directory by running composer update. You can also just reinstall mediawiki (follow the instructions for upgrading, just for same version).

That said i suspect that the vendor dependency is not the problem. If you have a mix of different versions of mediawiki, that might lead to something like this.

Reply to "MediaWiki runtime error:: No such service: HookContainer"