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
- Fresh install Drupal with Context module enabled
- In block layout edit a block which is currently displayed
- At Context (all) fill out a name of a non-existing context
- Save the configuration and notice your site is broken
Issue fork context-3283436
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
bizar1984 commentedComment #4
paulocsThanks!
Comment #6
paulocsComment #8
aitala commentedI got hit with this error all of a sudden on a site that's been working for quite a while.
After I applied the patch, the site came back online, and there was an all site context that didn't do anything but that should not have changed recently...
??
Thanks,
Eric
Comment #9
demonde commentedI still get this error message using a context block condition using a wildcard like
subsite_*on context(any) and context(all) condition.Comment #10
randalv commentedCan confirm I also still get this, I'm using the google_tag module and in
Context (any)the value was:*Simply removing
*and leaving it empty works for me, but that won't work for anyone using a value like:generic_name_*Comment #11
surfgatinho commentedStill broken.
Error occurs when using wildcard * as described above.