By default, the entity_block module has no protection for recursive rendering. This can cause the error when block is added to itself page.
Error log, stack trace:
The website encountered an unexpected error. Please try again later.
Error: Maximum function nesting level of '256' reached, aborting! in Drupal\Component\Plugin\PluginBase->__construct() (line 53 of core/lib/Drupal/Component/Plugin/PluginBase.php).
Drupal\Component\Plugin\PluginBase->__construct(Array, 'entity_field:node:field_paragraphs', Array) (Line: 56)
Drupal\Component\Plugin\ContextAwarePluginBase->__construct(Array, 'entity_field:node:field_paragraphs', Array) (Line: 58)
Drupal\Core\Block\BlockBase->__construct(Array, 'entity_field:node:field_paragraphs', Array) (Line: 113)
Drupal\ctools_block\Plugin\Block\EntityField->__construct(Array, 'entity_field:node:field_paragraphs', Array, Object, Object, Object, Object) (Line: 127)
Drupal\ctools_block\Plugin\Block\EntityField::create(Object, Array, 'entity_field:node:field_paragraphs', Array) (Line: 21)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('entity_field:node:field_paragraphs', Array) (Line: 76)
Drupal\Component\Plugin\PluginManagerBase->createInstance('entity_field:node:field_paragraphs', Array) (Line: 81)
Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin('a48d31d6-0607-489e-8ede-fd353bf7bcdc') (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get('a48d31d6-0607-489e-8ede-fd353bf7bcdc') (Line: 19)
Drupal\ctools\Plugin\BlockPluginCollection->get('a48d31d6-0607-489e-8ede-fd353bf7bcdc') (Line: 160)
Drupal\Core\Plugin\DefaultLazyPluginCollection->setInstanceConfiguration('a48d31d6-0607-489e-8ede-fd353bf7bcdc', Array) (Line: 135)
Drupal\Core\Plugin\DefaultLazyPluginCollection->setConfiguration(Array) (Line: 153)
Drupal\ctools\Plugin\DisplayVariant\BlockDisplayVariant->setConfiguration(Array) (Line: 470)
Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant->setConfiguration(Array) (Line: 30)
Drupal\Core\Display\VariantBase->__construct(Array, 'panels_variant', Array) (Line: 96)
Drupal\ctools\Plugin\DisplayVariant\BlockDisplayVariant->__construct(Array, 'panels_variant', Array, Object, Object, Object, Object, Object, Object) (Line: 107)
Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant->__construct(Array, 'panels_variant', Array, Object, Object, Object, Object, Object, Object, Object, Object, Object) (Line: 126)
Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant::create(Object, Array, 'panels_variant', Array) (Line: 21)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('panels_variant', Array) (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance('panels_variant', Array) (Line: 87)
Drupal\panels\PanelsDisplayManager->importDisplay(Array, ) (Line: 226)
Drupal\panelizer\Panelizer->getPanelsDisplay(Object, 'default', Object) (Line: 352)
Drupal\panelizer\PanelizerEntityViewBuilder->buildMultiplePanelized(Array, Array, 'default', NULL) (Line: 273)
Drupal\panelizer\PanelizerEntityViewBuilder->view(Object, 'default') (Line: 165)
Drupal\entity_block\Plugin\Block\EntityBlock->build() (Line: 135)
| Comment | File | Size | Author |
|---|
Issue fork entity_block-3160511
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nikolay.sh commentedThis patch added the protect from recursive rendering.
Comment #3
nikolay.sh commentedComment #5
nikolay.sh commentedAdded new patch with code style fixes.
Comment #6
nikolay.sh commentedComment #7
nikolay.sh commentedComment #8
mglaman+1, matches the format of
EntityReferenceEntityFormatter. I have one concern over using the entity UUID as the recursive render key. The key should also be based on the entity type.Drupal does not treat UUID's unique across entity types. Theoretically a Node and Taxonomy Term could have the same UUID without a collision.
Comment #10
mglamanOpened an MR with a reroll and a basic output test.
Comment #12
mglamanThanks, @nikolay.sh! Merged.