Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / content_moderation / src / Plugin / Field / ModerationStateFieldItemList.php
index 64c5ad849796d21b3623719d3bea82b97f40f5f1..357c60c9b300e40db3153395059309174519edf6 100644 (file)
@@ -93,7 +93,7 @@ class ModerationStateFieldItemList extends FieldItemList {
     if ($entity->getEntityType()->hasKey('langcode')) {
       $langcode = $entity->language()->getId();
       if (!$content_moderation_state->hasTranslation($langcode)) {
-        $content_moderation_state->addTranslation($langcode);
+        $content_moderation_state->addTranslation($langcode, $content_moderation_state->toArray());
       }
       if ($content_moderation_state->language()->getId() !== $langcode) {
         $content_moderation_state = $content_moderation_state->getTranslation($langcode);