field_attachments, field_visuel, admin node view

This commit is contained in:
2018-12-16 21:29:58 +01:00
parent b2dbacb786
commit 86792830fb
18 changed files with 167 additions and 38 deletions

View File

@@ -71,8 +71,19 @@ process:
plugin: migration_lookup
migration: d7_node_materiau
no_stub: true
# field_visuel: field_visuel
field_visuel:
plugin: iterator
source: field_visuel
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
alt: alt
title: title
height: height
width: width
migration_dependencies:

View File

@@ -94,17 +94,6 @@ process:
plugin: migration_lookup
migration: d7_node_breve
no_stub: true
# field_materiau_images:
# -
# plugin: skip_on_empty
# method: process
# source: field_materiau_image
# -
# plugin: migration_lookup
# migration: d7_allpublicfiles
# no_stub: true
field_materiau_images:
plugin: iterator
source: field_materiau_image
@@ -118,8 +107,17 @@ process:
title: title
height: height
width: width
# field_attachments: field_attachments
field_attachments:
plugin: iterator
source: field_attachments
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
# there is no description field filled
description: description
# field_famille: field_famille
# field_index: field_identifiant

View File

@@ -112,12 +112,17 @@ process:
3: "workflow_visible"
4: "workflow_imported"
5: "workflow_edited"
# work in progress
# not ready
# field_attachments: field_attachments
field_attachments:
plugin: iterator
source: field_attachments
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
# there is no description field filled
description: description
migration_dependencies:
required:

View File

@@ -33,3 +33,5 @@ https://evolvingweb.ca/blog/drupal-8-migration-migrating-taxonomy-term-reference
[Drupal 8 Migrations: Taxonomy and Nodes](https://www.phase2technology.com/blog/drupal-8-migrations)
[Migrating Content Translated with "Content Translation" from Drupal 7 to Drupal 8](https://evolvingweb.ca/blog/migrating-content-translated-content-translation-drupal-7-drupal-8)
[Drupal 8 Migration Survival Strategies](http://pnijjar.freeshell.org/2017/drupal8-migrate/)

View File

@@ -110,7 +110,7 @@ class D7NodeBreve extends FieldableEntity {
$vid = $row->getSourceProperty('vid');
$type = $row->getSourceProperty('type');
$title = $row->getSourceProperty('title');
drush_print('-- '.$nid."\t".$title);
// drush_print('-- '.$nid."\t".$title);
// If this entity was translated using Entity Translation, we need to get
// its source language to get the field values in the right language.

View File

@@ -110,7 +110,7 @@ class D7NodeMateriau extends FieldableEntity {
$vid = $row->getSourceProperty('vid');
$type = $row->getSourceProperty('type');
$title = $row->getSourceProperty('title');
drush_print('-- '.$nid."\t".$title);
// drush_print('-- '.$nid."\t".$title);
// If this entity was translated using Entity Translation, we need to get
// its source language to get the field values in the right language.

View File

@@ -108,7 +108,7 @@ class D7TaxonomyTermCompany extends FieldableEntity implements ContainerFactoryP
public function prepareRow(Row $row) {
$language = $row->getSourceProperty('language');
$tid = $row->getSourceProperty('tid');
drush_print('-- '.$language."\t".$tid."\t".$row->getSourceProperty('name'));
// drush_print('-- '.$language."\t".$tid."\t".$row->getSourceProperty('name'));
// vocabulary machine name
$machine_name = $row->getSourceProperty('machine_name');