Hi,

I have installed the Page Manager module, version 8.x-4.0-beta2, using drush and I got an error:

exception 'Drupal\Component\Plugin\Exception\PluginNotFoundException' with message 'The "page_variant" entity type does not exist.' in 
/Users/joseluis.ballesteros/Sites/drupal8/core/lib/Drupal/Core/Entity/EntityTypeManager.php:133

After that, the web browser shows: "The website encountered an unexpected error. Please try again later." And the site is unaccesible.

Then I cleaned cache, with drush cr, and it seems that everything works well.

This happens me with Drupal core 8.3.5 and previously I installed some modules such as:

- token 8.x-1.0
- ctools 8.x-3.0
- panels 8.x-4.2
- Layout discovery 8.3.5
- Among others core modules

Someone knows the reason? Can it affect me in the future, if I go on developing this site?
Today I will do more tests, if I find something wrong, i will let you know.
Thank you

Comments

balles created an issue. See original summary.

mpotter’s picture

There is definitely still an issue here. When I install our profile and then do a config-import from our running site, I get:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "page_variant"[error]
entity type does not exist. in
/var/www/build/html/core/lib/Drupal/Core/Entity/EntityTypeManager.php:133
Stack trace:
#0
/var/www/build/html/core/lib/Drupal/Core/Entity/EntityTypeManager.php(233):
Drupal\Core\Entity\EntityTypeManager->getDefinition('page_variant')
#1
/var/www/build/html/core/lib/Drupal/Core/Entity/EntityTypeManager.php(169):
Drupal\Core\Entity\EntityTypeManager->getHandler('page_variant', 'storage')
#2
/var/www/build/html/modules/contrib/page_manager/src/Routing/VariantRouteFilter.php(64):
Drupal\Core\Entity\EntityTypeManager->getStorage('page_variant')
...

So there is definitely still some kind of install-time problem here where it is trying to access the page_variant before it is defined.

I had the same problem with enabling Page Manager on a clean Lightning site where it gave this error until I cleared-cache. That was a work around, but doesn't help with the problem during a fresh install and config-import.

mpotter’s picture

Verified that if I clear-cache between doing the "site install" and doing the "config import", then it works.

However, this prevents a profile from being installed directly via config (via a core patch that is being worked in #2788777). Seems that it's the VariantRouteFilter that is looking for the page_variant before it is available. Not exactly sure how to fix this, but if the page_variant storage is not found it should probably clear the relevant cache and try again maybe?

b_sharpe’s picture

I am seeing the same thing, see https://www.drupal.org/node/2876880#comment-12239320

I came to the same conclusion that it is VariantRouteFilter not knowing about the definition because of cache. Not entirely sure how to fix properly just yet, but there is a work around in that issue.

weynhamz’s picture

Will happen on enabling it definitely, after, run a 'drush cache-rebuild' and a 'drush entity-updates' will fix.

aqcohen’s picture

I tried drush cr and drush entity-updates without sucess

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "page_variant" entity type does not [error]
exist. in /home/info/web/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php:133
Stack trace:
#0 /home/info/web/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(233):
Drupal\Core\Entity\EntityTypeManager->getDefinition('page_variant')
#1 /home/info/web/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(169):
Drupal\Core\Entity\EntityTypeManager->getHandler('page_variant', 'storage')
#2 /home/info/web/docroot/modules/contrib/page_manager/src/Routing/VariantRouteFilter.php(64):
Drupal\Core\Entity\EntityTypeManager->getStorage('page_variant')
#3 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(276):
Drupal\page_manager\Routing\VariantRouteFilter->__construct(Object(Drupal\Core\Entity\EntityTypeManager),
Object(Drupal\Core\Path\CurrentPathStack), Object(Symfony\Component\HttpFoundation\RequestStack))
#4 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'page_manager.va...')
#5 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('page_manager.va...', 1)
#6 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(329):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#7 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'router.no_acces...')
#8 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('router.no_acces...', 1)
#9 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#10 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'jsonapi.link_ma...')
#11 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('jsonapi.link_ma...', 1)
#12 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#13 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'serializer.norm...')
#14 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('serializer.norm...', 1)
#15 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(522):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#16 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#17 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'serializer')
#18 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('serializer', 1)
#19 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#20 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'simple_oauth.re...')
#21 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('simple_oauth.re...', 1)
#22 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(236):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#23 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'plugin.manager....')
#24 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(494):
Drupal\Component\DependencyInjection\Container->get('plugin.manager....', 1)
#25 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(329):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#26 /home/info/web/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177):
Drupal\Component\DependencyInjection\Container->createService(Array, 'plugin.cache_cl...')
#27 /home/info/web/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(200):
Drupal\Component\DependencyInjection\Container->get('plugin.cache_cl...')
#28 /home/info/web/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):
Drupal\Core\Extension\ModuleInstaller->install(Array, false)
#29 /home/info/web/docroot/core/includes/install.core.inc(1808):
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, false)
#30 /home/info/web/docroot/core/includes/batch.inc(252): _install_module_batch('page_manager', 'Page
Manager', Array)
#31 /home/info/web/docroot/core/includes/form.inc(874): _batch_process()
#32 /home/info/web/docroot/core/includes/install.core.inc(625): batch_process(Object(Drupal\Core\Url),
Object(Drupal\Core\Url))
#33 /home/info/web/docroot/core/includes/install.core.inc(546): install_run_task(Array, Array)
#34 /home/info/web/docroot/core/includes/install.core.inc(117): install_run_tasks(Array)
#35 phar:///usr/local/bin/drush/includes/drush.inc(726):
install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#36 phar:///usr/local/bin/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal',
Array)
#37 phar:///usr/local/bin/drush/commands/core/drupal/site_install.inc(82): drush_op('install_drupal',
Object(Composer\Autoload\ClassLoader), Array)
#38 phar:///usr/local/bin/drush/commands/core/site_install.drush.inc(255):
drush_core_site_install_version('openedu', Array)
#39 phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_site_install('openedu',
'\xE2\x80\x94site-name=Un...')
#40 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#41 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('openedu',
'\xE2\x80\x94site-name=Un...')
#42 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#43 phar:///usr/local/bin/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#44 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#45 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected.
...')
#46 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#47 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#48 {main}

ludo.r’s picture

Hi,

I don't know if it's related but I'm getting following error:

The import failed due for the following reasons:                                                                                                                                                                         [error]
Unexpected error during import with operation create for page_manager.page_variant.homepage-panels_variant-0: The "homepage" plugin does not exist.

Doing a cache rebuild then re-import does the trick.

mikemadison’s picture

FYI the patch on https://www.drupal.org/node/2876880 resolved this issue for me

mikemadison’s picture

Status: Active » Closed (duplicate)
Related issues: +#2876880: page_variant entity type does not exist when installing or enabling
shifali baghel’s picture