- Issue created by @loopy1492
- 🇺🇸United States loopy1492
I started working on this but I am NOT confident enough in the workings of this module to make any contributions at this time. For now, we will disable the module.
Here is what I have so far. It seemed to stop the error but I don't know if it messed anything else up. I just started changing things; I didn't delve into the guts of how it all works. Someone who knows what they are doing needs to fix this instead.
$libraries = []; $hook = 'library_info'; // Gather information from hook_library_info(). $module_handler = \Drupal::service('module_handler'); $libraries = $module_handler->invokeAllWith($hook, function (callable $hook, string $module) { foreach ($this->invoke($module, $hook) as $machine_name => $properties) { $properties['provider'] = $module; $libraries[$machine_name] = $properties; } });
- 🇯🇴Jordan bmustafa
i am getting this error too:
[29-Apr-2023 05:48:58 Asia/Dubai] Uncaught PHP Exception Error: "Call to undefined method Drupal\Core\Extension\ModuleHandler::getImplementations()" at D:\wamp64\www\seo_saja_drupal_backoffice\web\modules\contrib\libraries\libraries.module line 407
the module is not usable at this stage.
the above code suggestion did not work for, despite error gone, but the module does not function
- 🇳🇱Netherlands willempje2
Take a look at: https://www.drupal.org/project/libraries/issues/3342032 🐛 Undefined method getImplementations() Fixed
Seems to be same problem. - 🇨🇦Canada joseph.olstad
If you notice this, please upgrade to libraries version 4.0.3 or newer
see
🐛 Undefined method getImplementations() Fixed - Status changed to Closed: duplicate
over 1 year ago 11:18pm 15 May 2023 - 🇮🇳India ashetkar
Issue still exits in https://www.drupal.org/project/libraries/releases/4.0.3 → module version.
error] TypeError: Drupal\Component\DependencyInjection\ReverseContainer::generateServiceIdHash(): Argument #1 ($object) must be of type object, null given in Drupal\Component\DependencyInjection\ReverseContainer->generateServiceIdHash() (line 87 of /home/vsts/work/1/s/docroot/core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php) #0 [internal function]: Drupal\Component\DependencyInjection\ReverseContainer->generateServiceIdHash
- 🇨🇦Canada joseph.olstad
@ashetar please open a new issue to report the steps to reproduce. You might want to try: remove the modules/contrib folder and re-run composer install to make sure that your files are 100% in sync with the expected version 4.0.3. Then rebuild caches and re-test
- 🇮🇳India ashetkar
@joseph.olstad
Opened issue here.
https://www.drupal.org/project/libraries/issues/3367706 💬 Drupal\Component\DependencyInjection\ReverseContainer::generateServiceIdHash(): after installing libraries module Postponed: needs info - 🇺🇸United States alfattal Minnesota
@joseph.olstad I'm having the same issue. I've tried removing modules/contrib and following your suggested steps but that didn't help and I'm still getting the same error message.
- 🇨🇦Canada joseph.olstad
this is likely caused by one of your contrib modules that needs to be upgraded , the module may provide a library, or the library it'self may need to be upgraded.
Prior to upgrading to Drupal 10 you should use the upgrade_status module to display a report about your compatibility
You may also need to scan your custom modules using the scanning tool included with upgrade_status
drush us-a mymodulename
- 🇨🇦Canada joseph.olstad
What you can do is use this debugging technique and look at the stack of calls, look for module names and library names involved.
look at the comments on this page, explains a bit , put the debug right in the file that is throwing the error.
https://www.php.net/manual/en/function.debug-print-backtrace.php
- 🇮🇳India rakshith.thotada
I think if you have exported libraries config to default folder -> libraries.settings.yml - Delete it and setup in CI should work fine.
This I tried after a lot of iteration. Finally it worked