2

We have a field that is an Entity Reference to Blocks. In our situation, this field is referencing a View block. We are able to add this field on the content type and node properly, but when the page renders there is the following error message. We set this up using steps from Drupal 8: How to Reference a Views' Block Display from a Field.

Uncaught PHP Exception DomainException: "When a #lazy_builder callback is specified, no properties can exist; all properties must be generated by the #lazy_builder callback. You specified the following properties: #attached." at /mnt/www/html/netscout/docroot/core/lib/Drupal/Core/Render/Renderer.php line 333

How would we resolve this issue?

What we have tried:

  1. DomainException with #lazy_builder and ['#cache']['keys'], but this did not have anything that helped because we do not load the block by using #lazy_builder
  2. We tried updating our modules, but still get the error message
  3. Tried removing the removing the block reference, but then we were not able to add the view block to the page.

We are using Drupal v8.5.3.

1
  • Drupal puts each block in a lazybuilder by default. The main use case for blocks is not to be referenced in an entity and probably there are no tests that check for regressions. Since the linked blog post a lot has changed and now there are better solutions, see drupal.stackexchange.com/questions/261509/…
    – 4uk4
    Commented Jun 1, 2018 at 18:16

1 Answer 1

0

Rather than using Entity Reference to Block, we went with using Viewfield module. It has worked as expected with and without exposed filters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.