After updating to the latest release(8.x-1.0-beta3) i was unable to access any admin pages, instead receiving a 500 error message.
In drush drupal-watchdog i got:
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 /home/SITE/public_html/core/lib/Drupal/Core/Render/Renderer.php).

This was on Drupal 8.2.1 so I upgraded to Drupal 8.3 with no change. Then I rolled back Drupal to 8.2.1 with Photoswipe 8.x-1.0-beta2 and it is now working again.

I am not sure as this is the problem but it does look as though the changes to made to the renderInterface caused the issue.

Please let me know if any other information is helpful and I will get it.

CommentFileSizeAuthor
#5 render_context_empty-2824022-4.patch585 bytesgausarts

Comments

serg2 created an issue. See original summary.

serg2’s picture

Issue summary: View changes
jmoruzi’s picture

I have a similar issue with the latest beta, except I get the following when trying to access any admin page:

The website encountered an unexpected error. Please try again later.

PhotoSwipe 8.x-1.0-beta3
Drupal 8.2.1

As above, rolled back to PhotoSwipe 8.x-1.0-beta2 and problem solved.

Schnitzer’s picture

+1 @ comment #3

gausarts’s picture

Status: Active » Needs review
StatusFileSize
new585 bytes

I am working to integrate Blazy with this module, and noticed the error at View UI preview.

... As above, rolled back to PhotoSwipe 8.x-1.0-beta2 and problem solved.

This seems to be introduced to solve the cache issue #2737585: Not working on cached pages.

The error message provides the solution that this patch uses.
The attached fixes my issue. I haven't checked any other context but Views AJAX. Review is much appreciated.

shawn dearmond’s picture

Status: Needs review » Reviewed & tested by the community

Works like a charm! Please commit!

I ran it against our distro that has hundreds of behat tests. I'm pretty confident about this one.

serg2’s picture

++

  • sun committed 7a8c214 on 8.x-1.x authored by gausarts
    Issue #2824022 by gausarts, serg2: Fixed fatal error due to render()...
sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to 8.x-1.x!

Status: Fixed » Closed (fixed)

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