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).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | geofield_map-rendered_entity_infowindow-2940295-5.diff | 3.18 KB | itamair |
Comments
Comment #2
peximo commentedThe attached patch should fix the problem
Comment #3
itamair commentedtnx @peximo, going to review asap
Comment #4
itamair commentedComment #5
itamair commentedtnx @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).
Comment #7
itamair commented