ContextAll condition brakes on unknown context

Created on 31 May 2022, about 3 years ago
Updated 14 August 2023, almost 2 years ago

Problem/Motivation

I placed a block which referred to a context I already deleted. This value remained at Context (all). This broke the application and resulted in the following error: Error: Call to a member function getConditions() on null in Drupal\context\Plugin\Condition\ContextAll->getCacheContexts() (line 78 of modules/contrib/context/src/Plugin/Condition/ContextAll.php).

Steps to reproduce

  1. Fresh install Drupal with Context module enabled
  2. In block layout edit a block which is currently displayed
  3. At Context (all) fill out a name of a non-existing context
  4. Save the configuration and notice your site is broken
๐Ÿ› Bug report
Status

Fixed

Version

4.1

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands bizar1984

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