Problem

The #lazy_builder property was added to the render array which caused the following error.

 Type       :  php                                                             
 Severity   :  error                                                           
 Message    :  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: 
               #pre_render, #type, #attributes, #process, #theme_wrappers,     
               #defaults_loaded. in Drupal\Core\Render\Renderer->doRender()    
               (line 333 of                                                    
               /var/www/html/core/lib/Drupal/Core/Render/Renderer.php).  

Solution

Nuke the render array instead.

Comments

Kingdutch created an issue. See original summary.

kingdutch’s picture

Assigned: kingdutch » Unassigned
Status: Active » Needs review
StatusFileSize
new753 bytes
sah62’s picture

This patch seems to work just fine for me running 8.x-1.12.

jaapjan’s picture

Thank you for testing!

All the automated tests are also passing. Just merged the pull request and it will be in the next release.

jaapjan’s picture

Status: Needs review » Fixed

  • 2e0d512 committed on 8.x-1.x
    Issue #2954924 by Kingdutch, sah62: lazy_builder in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.