Entity Query does not bubble cache context correctly.

Created on 30 January 2024, 10 months ago
Updated 5 February 2024, 10 months ago

Problem/Motivation

Running an entity query in a test reveals leaked context.

How to reproduce

Create an entityQuerry for a node in a test using the QueryResultAssertionTrait and see that it fails with this error message.

Metadata was leaked during operation execution: i:6;:O:37:"Drupal\Core\Render\BubbleableMetadata":4:{s:16:"*cacheContexts";a:1:{i:0;s:21:"user.node_grants:view";}s:12:"*cacheTags";a:0:{}s:14:"*cacheMaxAge";i:-1;s:14:"*attachments";a:0:{}}

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇭Switzerland Siegrist

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024