fixed article migration : body & field_source
This commit is contained in:
		@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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']);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user