Disable DANSE in early bootstrap phases

Created on 21 February 2024, 9 months ago
Updated 6 March 2024, 9 months ago

Problem/Motivation

If DANSE wants to create an entity too early in the bootstrap, it fails with this exception:

<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)
Drupal\Core\Entity\EntityStorageBase-&gt;save() (Line: 806)
Drupal\Core\Entity\Sql\SqlContentEntityStorage-&gt;save() (Line: 352)
Drupal\Core\Entity\EntityBase-&gt;save() (Line: 382)
Drupal\danse\PluginBase-&gt;createEvent() (Line: 42)
Drupal\danse_log\Plugin\Danse\Log-&gt;createLogEvent() (Line: 87)
Drupal\danse_log\Logger-&gt;log() (Line: 127)
Drupal\Core\Logger\LoggerChannel-&gt;log() (Line: 175)
_drupal_log_error() (Line: 182)
_drupal_exception_handler()
</pre>

Proposed resolution

Find a way to stay silent until the system is ready to create entities.

📌 Task
Status

Fixed

Version

2.3

Component

Code

Created by

🇩🇪Germany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024