Skip to content
Snippets Groups Projects

Editor upgrade path shouldn't fatal

Open catch requested to merge issue/drupal-3463524:3463524-editorpostupdate into 10.3.x
1 file
+ 8
1
Compare changes
  • Side-by-side
  • Inline
@@ -125,7 +125,14 @@ public function label() {
public function calculateDependencies() {
parent::calculateDependencies();
// Create a dependency on the associated FilterFormat.
$this->addDependency('config', $this->getFilterFormat()->getConfigDependencyName());
$text_format = $this->getFilterFormat();
if ($text_format) {
$this->addDependency('config', $text_format->getConfigDependencyName());
}
else {
trigger_error("The editor {$this->id()} is configured for text format {$this->id()} which does not exist. Review whether it is still needed and delete if not.", E_USER_WARNING);
}
// @todo use EntityWithPluginCollectionInterface so configuration between
// config entity and dependency on provider is managed automatically.
$definition = $this->editorPluginManager()->createInstance($this->editor)->getPluginDefinition();
Loading