fixed article migration : body & field_source
This commit is contained in:
parent
7601bc2b24
commit
235ed1d32f
|
@ -1,9 +1,9 @@
|
||||||
uuid: ecec57d1-7cb8-4634-8508-05caa0e364ca
|
uuid: 62c0cbbe-058f-4cfb-83dc-33ddd12c54a8
|
||||||
langcode: en
|
langcode: en
|
||||||
status: true
|
status: true
|
||||||
dependencies: { }
|
dependencies: { }
|
||||||
_core:
|
_core:
|
||||||
default_config_hash: p0mdscuBIXXF0FIhjY9CCji-FhamTKx6LUlnwTkLzMY
|
default_config_hash: EMJZXjJ_nG0xuawQaOH-p_ORBAYmBTmygs_QRgD3qJ4
|
||||||
id: d7_node_article
|
id: d7_node_article
|
||||||
class: null
|
class: null
|
||||||
field_plugin_method: null
|
field_plugin_method: null
|
||||||
|
@ -36,7 +36,7 @@ process:
|
||||||
default_value: migration_imported
|
default_value: migration_imported
|
||||||
body:
|
body:
|
||||||
plugin: iterator
|
plugin: iterator
|
||||||
source: field_description
|
source: body
|
||||||
process:
|
process:
|
||||||
value: value
|
value: value
|
||||||
format:
|
format:
|
||||||
|
@ -93,6 +93,13 @@ process:
|
||||||
title: title
|
title: title
|
||||||
height: height
|
height: height
|
||||||
width: width
|
width: width
|
||||||
|
field_source:
|
||||||
|
plugin: iterator
|
||||||
|
source: field_source
|
||||||
|
process:
|
||||||
|
uri: url
|
||||||
|
title: title
|
||||||
|
options: attributes
|
||||||
destination:
|
destination:
|
||||||
plugin: 'entity:node'
|
plugin: 'entity:node'
|
||||||
migration_dependencies:
|
migration_dependencies:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
uuid: fa50653c-58b8-4478-ac5f-27f725726acc
|
uuid: 1c8c188b-7cb5-4062-ad62-e5eae3def31c
|
||||||
langcode: en
|
langcode: en
|
||||||
status: true
|
status: true
|
||||||
dependencies: { }
|
dependencies: { }
|
||||||
|
|
|
@ -37,7 +37,7 @@ process:
|
||||||
default_value: 'migration_imported'
|
default_value: 'migration_imported'
|
||||||
body:
|
body:
|
||||||
plugin: iterator
|
plugin: iterator
|
||||||
source: field_description
|
source: body
|
||||||
process:
|
process:
|
||||||
value: value
|
value: value
|
||||||
format:
|
format:
|
||||||
|
@ -94,7 +94,13 @@ process:
|
||||||
title: title
|
title: title
|
||||||
height: height
|
height: height
|
||||||
width: width
|
width: width
|
||||||
|
field_source:
|
||||||
|
plugin: iterator
|
||||||
|
source: field_source
|
||||||
|
process:
|
||||||
|
uri: url
|
||||||
|
title: title
|
||||||
|
options: attributes
|
||||||
|
|
||||||
migration_dependencies:
|
migration_dependencies:
|
||||||
required:
|
required:
|
||||||
|
|
|
@ -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
|
// workflow
|
||||||
$query = $this->select('workflow_node', 'wn');
|
$query = $this->select('workflow_node', 'wn');
|
||||||
$query->fields('wn', ['sid']);
|
$query->fields('wn', ['sid']);
|
||||||
|
|
Loading…
Reference in New Issue