Missing user cacheContext in ChainPermissionCalculator causes fatal error with Group 2.2

Created on 21 June 2024, 3 months ago
Updated 20 September 2024, 8 days ago

Problem/Motivation

I'm upgrading a client site from Group 1.x to 2.x in order to upgrade Drupal core to 10.2.7.

After the upgrade, I needed to change the Editor individually scoped Group role to an insider role in order to make Group roles behave as the client is accustomed to. When I did that, I got WSOD with this error in the logs:

LogicException: The complete set of cache contexts for a variation cache item must contain all of the initial cache contexts, missing: user. in Drupal\Core\Cache\VariationCache->set()

I believe I am encountering the same problem πŸ› The complete set of cache contexts for a variation cache item must contain all of the initial cache contexts. Closed: won't fix someone reported in the variationcache issue queue ("won't fix").

Steps to reproduce

  • Core 10.2.7
  • Group 2.2.2 (the client was previously on 1.0 so 3.0 is not an option)
  • Flexible Permissions 1.1

Proposed resolution

$calculated_permissions->addCacheContexts(['user']);

πŸ’¬ Support request
Status

Needs review

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States banoodle San Francisco, CA

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

Comments & Activities

Production build 0.71.5 2024