fixed article migration : body & field_source

This commit is contained in:
2019-02-15 12:36:08 +01:00
parent 7601bc2b24
commit 235ed1d32f
4 changed files with 29 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ process:
default_value: 'migration_imported'
body:
plugin: iterator
source: field_description
source: body
process:
value: value
format:
@@ -94,7 +94,13 @@ process:
title: title
height: height
width: width
field_source:
plugin: iterator
source: field_source
process:
uri: url
title: title
options: attributes
migration_dependencies:
required:

View File

@@ -153,6 +153,16 @@ class D7NodeBreve extends FieldableEntity {
}
}
// make sure that field_source url is absolute
$field_source = $row->getSourceProperty('field_source');
if(isset($field_source[0]['url'])){
$url = $field_source[0]['url'];
if(!strpos($url, 'http://')){
$field_source[0]['url'] = 'http://'.$url;
$row->setSourceProperty('field_source', $field_source);
}
}
// workflow
$query = $this->select('workflow_node', 'wn');
$query->fields('wn', ['sid']);