diff --git a/src/Controller/Backend/ContentEditController.php b/src/Controller/Backend/ContentEditController.php index a960dd472..b5efac584 100644 --- a/src/Controller/Backend/ContentEditController.php +++ b/src/Controller/Backend/ContentEditController.php @@ -214,6 +214,12 @@ public function save(?Content $originalContent = null, ?ContentValidatorInterfac $this->em->persist($content); $this->em->flush(); + // Set the list_format of the Record in the bolt_content table. This has to be done in a 2nd iteration because + // $content does not have id set untill the Entity Manager is flushed. + $content->setListFormat(); + $this->em->persist($content); + $this->em->flush(); + $urlParams = [ 'id' => $content->getId(), 'edit_locale' => $this->getEditLocale($content) ?: null, diff --git a/src/Entity/Content.php b/src/Entity/Content.php index 1f1471dff..24ae8e3f0 100644 --- a/src/Entity/Content.php +++ b/src/Entity/Content.php @@ -911,7 +911,7 @@ public function setListFormat(): self if ($this->contentExtension instanceof ContentExtension) { $this->listFormat = Excerpt::getExcerpt($this->getExtras()['listFormat'], 191); } else { - $this->title = ''; + $this->listFormat = ''; } return $this;