How to resolve lazy_builder error?

Drupal Answers Asked by usernameabc on August 19, 2020

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.

One Answer

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

Answered by usernameabc on August 19, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP