diff --git a/web/modules/custom/yufu_concept/src/Plugin/rest/resource/AddConcept.php b/web/modules/custom/yufu_concept/src/Plugin/rest/resource/AddConcept.php index e6405a8..318568c 100644 --- a/web/modules/custom/yufu_concept/src/Plugin/rest/resource/AddConcept.php +++ b/web/modules/custom/yufu_concept/src/Plugin/rest/resource/AddConcept.php @@ -2,7 +2,6 @@ namespace Drupal\yufu_concept\Plugin\rest\resource; -use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Session\AccountProxyInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; @@ -127,6 +126,7 @@ class AddConcept extends ResourceBase { $concept->isDefaultRevision(FALSE); $concept->setRevisionLogMessage('New revision by concept endpoint.'); $concept->moderation_state->target_id = 'draft'; + $concept->set('status', 0); $concept->setUnpublished(); $concept->save(); $this->logger->notice('New concept @title revision @revid created by uid @uid.', [