- Issue created by @R_H-L
- First commit to issue fork.
revision_log_default.module lines 144-145 use \Drupal::service('renderer')->render
to render inline templates, however when node->save
is called programatically via command line, such as in an update hook being fired via drush updb
, this has no context and throws an exception:
[error] LogicException: Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead. in Drupal\Core\Render\Renderer->doRender() (line 245 of /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php).
Drupal\Core\Entity\EntityStorageException with message 'Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead.'
Create an update hook that fires a node->save, run via drush
Switch these render
calls to renderPlain
.
Active
1.3
Code