From ad677f5831e40e1b1643c60e274b48f4b008b699 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Sat, 16 Mar 2019 19:05:30 +1100 Subject: [PATCH] [GOVCMSD8-298] Fixed the moderation state of demo content. --- .../optional/govcms8_default_content/src/InstallHelper.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/custom/optional/govcms8_default_content/src/InstallHelper.php b/modules/custom/optional/govcms8_default_content/src/InstallHelper.php index 60b1375b7..1d15ca9ab 100644 --- a/modules/custom/optional/govcms8_default_content/src/InstallHelper.php +++ b/modules/custom/optional/govcms8_default_content/src/InstallHelper.php @@ -135,6 +135,8 @@ protected function importPages() { // Create Node. $node = $this->entityTypeManager->getStorage('node')->create($values); + $node->setPublished(TRUE); + $node->set('moderation_state', "published"); $node->save(); // Create menu links.