Skip to content
Snippets Groups Projects
Commit 4850140c authored by Brent Gees's avatar Brent Gees Committed by Oleksandr Kuzava
Browse files

Issue #3273454: Field path is unknown when path is not installed

parent eb8bd105
No related branches found
No related tags found
1 merge request!6Issue #3273454: Field path is unknown when path is not installed
......@@ -161,7 +161,7 @@ class ContentExporter implements ContentExporterInterface {
'created' => $entity->getCreatedTime(),
'changed' => $entity->getChangedTime(),
'author' => $owner ? $owner->getEmail() : NULL,
'url' => $entity->get('path')->alias ?? NULL,
'url' => $entity->hasField('path') ? $entity->get('path')->alias : NULL
];
}
break;
......
......@@ -363,17 +363,21 @@ class ContentImporter implements ContentImporterInterface {
switch ($entity_type_id) {
case 'node':
return [
$node = [
'title' => $values['title'],
'langcode' => $values['langcode'],
'created' => $values['created'],
'changed' => $values['changed'],
'status' => $values['status'],
'path' => [
];
// We check if node url alias is filled in.
if (isset($values['url'])) {
$node = [
'alias' => $values['url'],
'pathauto' => empty($values['url']),
],
];
];
}
return $node;
case 'user':
return [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment