Skip to content

Commit

Permalink
Set list_format in ContentEditController save function
Browse files Browse the repository at this point in the history
  • Loading branch information
nestordedios committed Jan 22, 2024
1 parent 371451f commit ee3c140
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Controller/Backend/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ee3c140

Please sign in to comment.