LogicException: Bubbling failed

Created on 11 February 2022, almost 3 years ago
Updated 4 March 2023, almost 2 years ago

Problem/Motivation

We're getting an issue when searching for a couple specific terms (not all):

LogicException: Bubbling failed. in Drupal\Core\Render\Renderer->executeInRenderContext() (line 567 of core/lib/Drupal/Core/Render/Renderer.php).
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)

Steps to reproduce

For us, visiting the following path does the trick:
/search_api_autocomplete/search?display=search&filter=zoeken&q=Alex
However, I can imagine this depends on the search index.

Proposed resolution

The cause is this line:

$label = $this->renderer->render($build);

RendererInterface::renderPlain should be used instead if the caching metadata is being ignored. A better solution IMO is to make the response cacheable as discussed in #3068289 Make Json response cacheable Needs work , but we can already commit this fix in the meantime.

🐛 Bug report
Status

Fixed

Version

1.0

Component

General code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024