Steps to reproduce

* Complete a site install using core's standard profile
* download synonyms and install with drush, observe error in terminal
* also, navigate to any page.
* version
# Information added by Drupal.org packaging script on 2016-10-23
version: '8.x-1.x-dev'
core: '8.x'
project: 'synonyms'
datestamp: 1477253461

The website encountered an unexpected error. Please try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "synonym" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 133 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Stacktrace

drush @d8.mcdev en synonyms -y
The following extensions will be enabled: synonyms
Do you really want to continue? (y/n): y
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "synonym" entity type does not exist. in [error]
/home/vagrant/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php:133
Stack trace:
#0 /home/vagrant/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(233): Drupal\Core\Entity\EntityTypeManager->getDefinition('synonym')
#1 /home/vagrant/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(169): Drupal\Core\Entity\EntityTypeManager->getHandler('synonym', 'storage')
#2 /home/vagrant/docroot/modules/contrib/synonyms/src/SynonymsService/BehaviorService.php(33): Drupal\Core\Entity\EntityTypeManager->getStorage('synonym')
#3 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(268):
Drupal\synonyms\SynonymsService\BehaviorService->__construct(Object(Drupal\Core\Entity\EntityTypeManager))
#4 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array,
'synonyms.behavi...')
#5 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('synonyms.behavi...', 1)
#6 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#7 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array,
'synonyms.param_...')
#8 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('synonyms.param_...', 1)
#9 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(329):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#10 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array,
'paramconverter_...')
#11 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('paramconverter_...', 1)
#12 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#13 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array,
'access_manager')
#14 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494): Drupal\Component\DependencyInjection\Container->get('access_manager',
1)
#15 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#16 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array,
'plugin.manager....')
#17 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('plugin.manager....', 1)
#18 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(329):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#19 /home/vagrant/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array,
'plugin.cache_cl...')
#20 /home/vagrant/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(200): Drupal\Component\DependencyInjection\Container->get('plugin.cache_cl...')
#21 /home/vagrant/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, true)
#22 /usr/local/share/drush/commands/core/drupal/environment.inc(131): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true)
#23 /usr/local/share/drush/commands/core/drupal/environment.inc(198): drush_module_install(Array)
#24 /usr/local/share/drush/commands/pm/pm.drush.inc(1167): drush_module_enable(Array)
#25 /usr/local/share/drush/includes/command.inc(366): drush_pm_enable('synonyms')
#26 /usr/local/share/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#27 /usr/local/share/drush/includes/command.inc(185): drush_command('synonyms')
#28 /usr/local/share/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#29 /usr/local/share/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#30 /usr/local/share/drush/drush.php(12): drush_main()
#31 {main}

CommentFileSizeAuthor
#2 2821860-synonyms-install-2.patch1.67 KBbucefal91
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jasonawant created an issue. See original summary.

bucefal91’s picture

Status: Active » Needs review
FileSize
1.67 KB

Seems like during module my code was calling not-yet-installed components of itself. I've reorganized code to make it a little "lazier" as for calling the synonym entity storage in order to break this loop.

Patch is attached. With this patch I can install the module and all its functions are preserved.

jasonawant’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Installed without issue.

  • bucefal91 committed e4a9bb8 on 8.x-1.x
    Issue #2821860 by bucefal91, jasonawant: Installing throws Drupal\...
bucefal91’s picture

Status: Reviewed & tested by the community » Fixed

Thank you, Jason. I've committed the patch.

Status: Fixed » Closed (fixed)

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

devad’s picture

Version: 8.x-1.x-dev » 2.0.x-dev