diff --git a/src/Import.php b/src/Import.php index 2efe50fd..6cffa252 100644 --- a/src/Import.php +++ b/src/Import.php @@ -98,7 +98,6 @@ protected function buildEntry(&$model, $entry) foreach ($entry->units as $new) { $clid = $new->clid; foreach ($model->units as $i => $current) { - var_dump($current->getId(), $clid); if (is_array($current) && $current['clid'] === $clid) { $type = detectUnitTypeSpecifier($new->type); switch ($type) { @@ -121,22 +120,21 @@ protected function buildEntry(&$model, $entry) $model->units[$i] = $current; break; } elseif (is_object($current) && $current->getId() === $clid) { - var_dump($new->text); $type = detectUnitTypeSpecifier($new->type); switch ($type) { case 'text': $current->setField1($new->text); break; case 'table': - $current->setTable($new->table); + $current->setField1($new->table); break; case 'media': case 'image': - $current->setCaption($new->caption); - $current->setAlt($new->alt); + $current->setField1($new->caption); + $current->setField4($new->alt); break; case 'file': - $current->setCaption($new->caption); + $current->setField1($new->caption); break; } $newId = $current->generateNewIdTrait(); @@ -148,8 +146,6 @@ protected function buildEntry(&$model, $entry) } } - // var_dump($model); - // field if (property_exists($entry, 'fields') && is_array($entry->fields)) { foreach ($entry->fields as $field) {