When I do 'drush si', I get this error:

PHP Fatal error:  Call to a member function getPath() on a non-object in core/includes/install.inc on line 940

I suspect this is because the info.yml file doesn't have a dependencies: property.

Comments

joachim created an issue. See original summary.

alexpott’s picture

  foreach ($info['dependencies'] as $module) {
    $file = \Drupal::root() . '/' . $module_list[$module]->getPath() . "/$module.install";

It looks like one of the dependencies does not exist as $module_list[$module] is not an object.

alexpott’s picture

Can I have a bit more to go on? When are you running drush si and what do you expect to happen?

I can use drush si config_installer to re-install from config just fine. If I use drush si on an existing site it will reinstall using the selected installation profile.

joachim’s picture

I had a site that I installed using the config installer, and which was broken (possibly due to #2715993: installer crashes during import...).

I ran 'drush si', and got the error.

I also tried "drush si config_installer config_installer_sync_configure_form.sync_directory='../config/sync'" and IIRC got the same error.

Unfortunately, I've now got it running (DB dump import in the end...) so I can't try it again!

alexpott’s picture

Status: Active » Postponed (maintainer needs more info)

Ah I see - I'm going to postpone this then - using drush si could result in #2715993: installer crashes during import since if it crashes during standard_install the profile will still be config_installer in settings.php so when using drush si you'd get the same error.

drupalninja99’s picture

I am getting this same error only on Acquia. Locally everything works great.

drupalninja99’s picture

It looks like what breaks it is if you have $settings['install_profile'] = 'config_installer' left inside of settings.php

drupalninja99’s picture

It looks now like my issue was something unique to a sync gone awry with Acquia's repo.

andypost’s picture

Status: Postponed (maintainer needs more info) » Fixed
Related issues: +#2608408: Call to a member function getPath() when installing Profiles with unknown modules as requirement

This should be fixed in 8.3.x

About existing install should contain "core.extension" see _config_installer_get_original_install_profile() which searching installed profile within installed modules

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.