Condition plugins should not rely on the existance of the token named "entity"
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3271771. -->
Reported by: [jurgenhaas](https://www.drupal.org/user/168924)
Related to !105
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>All conditions in the sub-module <code>eca_content</code> use <code>$entity = $this->getContextValue('entity');</code> at the beginning of their <code>evaluate</code> method. If that context isn't available, this throws an exception and produces a WSOD.</p>
<p>That happens e.g. if the triggering event is not entity related, then the token "entity" is not defined and the context won't be available, unless the model puts another entity onto the token stack, but then the conditions need to refer to the name of that token.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>The exception needs to be caught and the <code>evaluate</code> methods then must respond FALSE.</p>
> Related issue: [Issue #3238206](https://www.drupal.org/node/3238206)
issue