Repeatable: Always

Steps to repeat:
1. Add a geofield field to a block entity
2. In the formatter settings, MAP MARKER AND INFOWINDOW section, set Rendered block_content entity with view mode full (the default)
3. View the block

Expected Results:
User sees the block markup inside the infowindow

Actual Results:
Error page with this message:

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 241 of core/lib/Drupal/Core/Render/Renderer.php).

Comments

peximo created an issue. See original summary.

peximo’s picture

The attached patch should fix the problem

itamair’s picture

tnx @peximo, going to review asap

itamair’s picture

Status: Active » Needs review
itamair’s picture

StatusFileSize
new3.18 KB

tnx @peximo your patch solves this matter, and indeed uniforms the GeofieldGoogleMapFormatter to the GeofieldGoogleMapViewStyle.
But your patch was missing some correct namespace and some important D8 OOP concept (use interfaces more than classes).
Here is the patch that is going to be applied to dev (and new release).

  • itamair committed cb1212f on 8.x-1.x
    Issue #2940295 by peximo, itamair: Page broken if rendered entity option...
itamair’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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