- Issue created by @vikas shishodia
- 🇨🇭Switzerland yobottehg Basel
Could it be that you are hitting this here?
https://github.com/chapter-three/next-drupal/issues/549
Getting below error on enabling Webform module
The website encountered an unexpected error. Please try again later.
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.webform.canonical" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Routing\UrlGenerator->getRoute('entity.webform.canonical') (Line: 276)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.webform.canonical', Array, Array, 1) (Line: 108)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.webform.canonical', Array, Array, 1) (Line: 765)
Drupal\Core\Url->toString(1) (Line: 78)
Drupal\next\Event\EntityActionEvent::createFromEntity(Object, 'insert') (Line: 71)
next_entity_insert(Object, 'webform')
call_user_func_array(Object, Array) (Line: 409)
Cause of issue is
/**
* Implements hook_entity_insert().
*/
function next_entity_insert(EntityInterface $entity) {
$event = EntityActionEvent::createFromEntity($entity, EntityActionEventInterface::INSERT_ACTION);
drupal_register_shutdown_function('_next_dispatch_entity_action_event', $event);
}
If I clear route cache before this then everything works fine.
/**
* Implements hook_entity_insert().
*/
function next_entity_insert(EntityInterface $entity) {
// Clear route cache
\Drupal::service("router.builder")->rebuild();
$event = EntityActionEvent::createFromEntity($entity, EntityActionEventInterface::INSERT_ACTION);
drupal_register_shutdown_function('_next_dispatch_entity_action_event', $event);
}
Active
1.6
Code
Could it be that you are hitting this here?
https://github.com/chapter-three/next-drupal/issues/549