Disable DANSE in early bootstrap phases
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3422892. -->
Reported by: [jurgenhaas](https://www.drupal.org/user/168924)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>If DANSE wants to create an entity too early in the bootstrap, it fails with this exception:</p>
<pre><em class="placeholder">Error</em>: Undefined constant &quot;Drupal\Core\Entity\SAVED_NEW&quot; in <em class="placeholder">Drupal\Core\Entity\ContentEntityStorageBase-&gt;doSave()</em> (line <em class="placeholder">698</em> of <em class="placeholder">/var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php</em>). <pre class="backtrace">Drupal\Core\Entity\ContentEntityStorageBase-&gt;doSave() (Line: 486)<br>Drupal\Core\Entity\EntityStorageBase-&gt;save() (Line: 806)<br>Drupal\Core\Entity\Sql\SqlContentEntityStorage-&gt;save() (Line: 352)<br>Drupal\Core\Entity\EntityBase-&gt;save() (Line: 382)<br>Drupal\danse\PluginBase-&gt;createEvent() (Line: 42)<br>Drupal\danse_log\Plugin\Danse\Log-&gt;createLogEvent() (Line: 87)<br>Drupal\danse_log\Logger-&gt;log() (Line: 127)<br>Drupal\Core\Logger\LoggerChannel-&gt;log() (Line: 175)<br>_drupal_log_error() (Line: 182)<br>_drupal_exception_handler()<br></pre></pre><h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Find a way to stay silent until the system is ready to create entities.</p>
issue