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>&lt;em class="placeholder"&gt;Error&lt;/em&gt;: Undefined constant &amp;quot;Drupal\Core\Entity\SAVED_NEW&amp;quot; in &lt;em class="placeholder"&gt;Drupal\Core\Entity\ContentEntityStorageBase-&amp;gt;doSave()&lt;/em&gt; (line &lt;em class="placeholder"&gt;698&lt;/em&gt; of &lt;em class="placeholder"&gt;/var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php&lt;/em&gt;). &lt;pre class="backtrace"&gt;Drupal\Core\Entity\ContentEntityStorageBase-&amp;gt;doSave() (Line: 486)<br>Drupal\Core\Entity\EntityStorageBase-&amp;gt;save() (Line: 806)<br>Drupal\Core\Entity\Sql\SqlContentEntityStorage-&amp;gt;save() (Line: 352)<br>Drupal\Core\Entity\EntityBase-&amp;gt;save() (Line: 382)<br>Drupal\danse\PluginBase-&amp;gt;createEvent() (Line: 42)<br>Drupal\danse_log\Plugin\Danse\Log-&amp;gt;createLogEvent() (Line: 87)<br>Drupal\danse_log\Logger-&amp;gt;log() (Line: 127)<br>Drupal\Core\Logger\LoggerChannel-&amp;gt;log() (Line: 175)<br>_drupal_log_error() (Line: 182)<br>_drupal_exception_handler()<br>&lt;/pre&gt;</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