I get a Drupal\Component\Plugin\Exception\PluginNotFoundException when I install from config under Drupal 8.1.0-rc1.

Here are the steps I followed:

  1. Set the config directory in settings.php with $config_directories[CONFIG_SYNC_DIRECTORY] = '../conf/drupal/config';
  2. Install Drupal 8.1.0-rc1 using "drush site-install standard"
  3. Verify the site is running
  4. Export the fresh config using "drush config-export"
  5. Reinstall Drupal using "drush site-install config_installer"

The full error that I get is this:

    [drush] Executing '/var/www/drupal.local/vendor/bin/drush --nocolor --root="/var/www/drupal.local/web" --uri="http://drupal.local" --config="/var/www/drupal.local/conf/drushrc.php" --yes site-install "config_installer"'...
Starting Drupal installation. This takes a while. Consider using the --notify global option.                                                                                                                                                                                                                                                                          [ok]
exception 'Drupal\Component\Plugin\Exception\PluginNotFoundException' with message 'Plugin ID 'contact.site_page' was not found.' in /var/www/drupal.local/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php:213                                                                                                                                                     [error]
Stack trace:
#0 /var/www/drupal.local/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(20): Drupal\Core\Menu\MenuLinkManager->getDefinition('contact.site_pa...')
#1 /var/www/drupal.local/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(240): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('contact.site_pa...', Array)
#2 /var/www/drupal.local/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(371): Drupal\Core\Menu\MenuLinkManager->createInstance('contact.site_pa...')
#3 /var/www/drupal.local/web/core/profiles/standard/standard.install(42): Drupal\Core\Menu\MenuLinkManager->updateDefinition('contact.site_pa...', Array)
#4 [internal function]: standard_install()
#5 /var/www/drupal.local/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(396): call_user_func_array('standard_instal...', Array)
#6 /var/www/drupal.local/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php(288): Drupal\Core\Extension\ModuleHandler->invoke('standard', 'install')
#7 /var/www/drupal.local/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(87): Drupal\Core\Extension\ModuleInstaller->install(Array, false)
#8 /var/www/drupal.local/web/profiles/contrib/config_installer/config_installer.profile(192): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, false)
#9 [internal function]: config_installer_config_import_profile(Array, Object(Drupal\Core\Config\ConfigImporter))
#10 /var/www/drupal.local/web/core/lib/Drupal/Core/Config/ConfigImporter.php(495): call_user_func_array('config_installe...', Array)
#11 /var/www/drupal.local/web/profiles/contrib/config_installer/config_installer.profile(135): Drupal\Core\Config\ConfigImporter->doSyncStep('config_installe...', Array)
#12 [internal function]: config_install_batch_process(Object(Drupal\Core\Config\ConfigImporter), 'config_installe...', Array)
#13 /var/www/drupal.local/web/core/includes/batch.inc(252): call_user_func_array('config_install_...', Array)
#14 /var/www/drupal.local/web/core/includes/form.inc(871): _batch_process()
#15 /var/www/drupal.local/web/core/includes/install.core.inc(611): batch_process(Object(Drupal\Core\Url), Object(Drupal\Core\Url))
#16 /var/www/drupal.local/web/core/includes/install.core.inc(532): install_run_task(Array, Array)
#17 /var/www/drupal.local/web/core/includes/install.core.inc(116): install_run_tasks(Array)
#18 /var/www/drupal.local/vendor/drush/drush/includes/drush.inc(726): install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#19 /var/www/drupal.local/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal', Array)
#20 /var/www/drupal.local/vendor/drush/drush/commands/core/drupal/site_install.inc(80): drush_op('install_drupal', Object(Composer\Autoload\ClassLoader), Array)
#21 /var/www/drupal.local/vendor/drush/drush/commands/core/site_install.drush.inc(247): drush_core_site_install_version('config_installe...', Array)
#22 [internal function]: drush_core_site_install('config_installe...')
#23 /var/www/drupal.local/vendor/drush/drush/includes/command.inc(366): call_user_func_array('drush_core_site...', Array)
#24 /var/www/drupal.local/vendor/drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#25 [internal function]: drush_command('config_installe...')
#26 /var/www/drupal.local/vendor/drush/drush/includes/command.inc(185): call_user_func_array('drush_command', Array)
#27 /var/www/drupal.local/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#28 /var/www/drupal.local/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#29 /var/www/drupal.local/vendor/drush/drush/drush.php(12): drush_main()
#30 {main}

This process was working for me under Drupal 8.0.x; could something have changed in Drupal 8.1 that is breaking this?

Comments

becw created an issue. See original summary.

alexpott’s picture

Best guess is that this is due to the changes in #2589967: Rebuild routes immediately when modules are installed... will look into this.

alexpott’s picture

Good news is that this seems to only occur when using drush and not when you use the interactive installer.

alexpott’s picture

I've repeated the test on 8.2.x and 8.1.x with drush and can't reproduce the error - looking at the exception it looks like somehow the contact module has not been installed. I wonder how that has occurred.

I guess the only other variable is drush version... I'm currently using 8.1-dev

ayalon’s picture

I have the same problem. But it occurs while using drush and the web installer. I don't understand why standard_installer() is called anyway.

Also using Drupal 8.1 RC1

I have a repository where I can reproduce the error easily if you want to test it I can upload it to github.

ayalon’s picture

I have tested it with Drush 8.0.5 and I have the same error as with 9.0-dev, I don't think its drush related.

alexpott’s picture

@ayalon - are your steps the same as in the issue summary? If can upload the config to github that might be helpful. It is weird I couldn't reproduce the issue.

alexpott’s picture

Okay alexpott-- I can repeat this on 8.1.x-rc1 - the good news is that this is fixed already in 8.1.x and therefore will in 8.1.0.

ayalon’s picture

@alexpott

We did a hackday on drupal 8 and I prepared a repository that is installing drupal 8 from a composer.jon file. You can use this repository:
https://github.com/ayalon/drupal8-migrate

All steps a briefly documented. The idea was to automate the install of drupal 8.1 completely. Unfortunatly the site install fails.

alexpott’s picture

Status: Active » Closed (outdated)

The patch that fixed this was #2589967: Rebuild routes immediately when modules are installed

I've tested this by applying the last patch there to 8.1.0-rc1 and running the steps to reproduce on in the issue summary. I don't get the errors. If I run without out the patch I do.

Given that 8.1.0-rc1 is not a proper release I don't think we need to do anything here. The 8.0.x release work and the upcoming (today or tomorrow) 8.1.0 release will work too.

alexpott’s picture

xjm’s picture

Status: Closed (outdated) » Closed (duplicate)
ayalon’s picture

Thx for your help @alexpott! The patch fixes indeed the config installation. Many thx for support.