Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / migrate / src / Plugin / migrate / destination / EntityFieldStorageConfig.php
index 80ea9f628b8b3cdb253b22d36f5decb5e333965e..0b9714a79b11e1de973ee63d3253456f185ec090 100644 (file)
@@ -58,6 +58,10 @@ class EntityFieldStorageConfig extends EntityConfigBase {
   public function getIds() {
     $ids['entity_type']['type'] = 'string';
     $ids['field_name']['type'] = 'string';
+    // @todo: Remove conditional. https://www.drupal.org/node/3004574
+    if ($this->isTranslationDestination()) {
+      $ids['langcode']['type'] = 'string';
+    }
     return $ids;
   }
 
@@ -65,8 +69,18 @@ class EntityFieldStorageConfig extends EntityConfigBase {
    * {@inheritdoc}
    */
   public function rollback(array $destination_identifier) {
-    $destination_identifier = implode('.', $destination_identifier);
-    parent::rollback([$destination_identifier]);
+    if ($this->isTranslationDestination()) {
+      $language = $destination_identifier['langcode'];
+      unset($destination_identifier['langcode']);
+      $destination_identifier = [
+        implode('.', $destination_identifier),
+        'langcode' => $language,
+      ];
+    }
+    else {
+      $destination_identifier = [implode('.', $destination_identifier)];
+    }
+    parent::rollback($destination_identifier);
   }
 
 }