Breadcrumbs: leaked metadata

Created on 25 September 2023, over 1 year ago
Updated 6 November 2023, about 1 year ago

Problem/Motivation

Adding `breadcrumbs` to route query results in empty breadcrumbs and error in logs:
LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\graphql\SubRequestResponse. in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (line 154 of /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php).

Proposed resolution

Wrap breadcrumb manager call with executeInRenderContext()

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇾Belarus Yury N

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

Comments & Activities

Production build 0.71.5 2024