After the update I can browse as anonymous user or can login as normal user, but as soon as I try to login as user 1 I receive the following error:

The website encountered an unexpected error. Please try again later.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. in Drupal\Core\Render\Renderer->doRender() (line 333 of core/lib/Drupal/Core/Render/Renderer.php).

Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 93)
template_preprocess_toolbar(Array, 'toolbar', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('toolbar', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 95)
__TwigTemplate_57c5aef71d25fc70104af0e339f0f51e9313cd092de009415fd74aa7d98b089b->doDisplay(Array, Array) (Line: 432)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 403)
Twig_Template->display(Array) (Line: 411)
Twig_Template->render(Array) (Line: 64)
twig_render_template('profiles/contrib/social/themes/socialbase/templates/system/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 576)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 108)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

This only happens on 1 of 3 installs I updated now.

CommentFileSizeAuthor
#7 pre_render-2930298-7.patch3.95 KBslowflyer

Comments

slowflyer created an issue. See original summary.

socialnicheguru’s picture

I get the same error

frankgraave’s picture

Hi Slowflyer,

I will investigate this issue. Has the update been done through the UI?

Cheers, Frank

slowflyer’s picture

Hi Frank,

no the update was made on commanline with "composer update".
I'm not sure what's the difference between the on installation where it occurs, and my 3 other installation working fine.
It seems not to be code related.

Thanks,
Ullrich

trungonly’s picture

I got same error after update some modules today.

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."

socialnicheguru’s picture

I am seeing that social_admin_menu defines‘#pre_render.

slowflyer’s picture

Title: After update from 8.x-1.7 » #pre_render in social_admin_menu breaks site for roles using admin toolbar
StatusFileSize
new3.95 KB

I replaced the #pre_render syntax with a #lazy_builder syntax.

After that, every thing works fine for me.

slowflyer’s picture

Status: Active » Needs review
sah62’s picture

The patch in #7 seems to work for me.

frankgraave’s picture

Status: Needs review » Fixed

Thanks slowflyer, the patch works perfect and will be in our next release.

Status: Fixed » Closed (fixed)

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

ok_lyndsey’s picture

Hi was this patch added? I had this error after enabling social admin menu and I'm not seeing the patch code in the file.

jaapjan’s picture

It should be. You can find it in this pull request https://github.com/goalgorilla/open_social/pull/680 which was merged into release 1.9.