popsu_migrate: D7NodeEvemenent ok
This commit is contained in:
parent
7837b6e41e
commit
3ad0c731f9
@ -1,4 +1,4 @@
|
||||
uuid: d8b54ad5-2208-4425-b723-a887d54c2dbd
|
||||
uuid: cf4124c8-cc6b-450b-9ede-328076235970
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,9 +1,9 @@
|
||||
uuid: b499f0ee-400a-4ca6-b840-5f512a654d9f
|
||||
uuid: be789f3f-d3d7-48c3-8a70-b93119076a41
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
_core:
|
||||
default_config_hash: PSsiiyyevWgCYzvYGFZ21_JeY4biek3VX8UWRJC84xA
|
||||
default_config_hash: xRLAUHUEsPu8KEzDWCJXTmDeJV_GjCcaFRfmeFVyngI
|
||||
id: d7_node_evenement
|
||||
class: null
|
||||
field_plugin_method: null
|
||||
@ -36,6 +36,56 @@ process:
|
||||
migration: d7_node_programme
|
||||
source: nid
|
||||
no_stub: true
|
||||
field_theme:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_theme
|
||||
source: field_theme
|
||||
no_stub: true
|
||||
field_projet:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_projet
|
||||
source: field_projet
|
||||
no_stub: true
|
||||
field_sous_titre: field_popsu_colloque_subtitle
|
||||
field_intro:
|
||||
plugin: sub_process
|
||||
source: field_popsu_colloque_subtitle2
|
||||
process:
|
||||
value: value
|
||||
summary: summary
|
||||
format:
|
||||
plugin: default_value
|
||||
default_value: wysiwyg
|
||||
body:
|
||||
plugin: sub_process
|
||||
source: body
|
||||
process:
|
||||
value: value
|
||||
summary: summary
|
||||
format:
|
||||
plugin: default_value
|
||||
default_value: wysiwyg
|
||||
field_image:
|
||||
plugin: sub_process
|
||||
source: field_popsu_colloque_imageintro
|
||||
process:
|
||||
target_id:
|
||||
plugin: migration_lookup
|
||||
migration: d7_allpublicfiles
|
||||
source: fid
|
||||
no_stub: true
|
||||
alt: alt
|
||||
title: title
|
||||
field_ressources_liees:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_ressource
|
||||
source: field_ressource
|
||||
no_stub: true
|
||||
field_evenements_liees:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_evenement
|
||||
source: field_evenement
|
||||
no_stub: true
|
||||
field_memo: field_memo
|
||||
destination:
|
||||
plugin: 'entity:node'
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: 3fa15bd5-3513-404f-a196-9803dda7cc19
|
||||
uuid: 59b95e8c-21fb-434f-b6a6-cc668e524c32
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: d52cf24c-ba35-48c8-9953-63aa84ac4b75
|
||||
uuid: cb12b218-4bf0-436d-9153-5031392c95de
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: 5cc47721-5d98-4633-a864-748cc97d059a
|
||||
uuid: b153072c-b974-482e-9b41-64e4b696ee60
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: 022db3b4-b28b-4ca0-afc9-bb9b2a1547a5
|
||||
uuid: 652e81fb-fd06-4257-90c1-8b34ff9f015b
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: cbfc7e24-8c0d-4fee-9899-c4274ca165c3
|
||||
uuid: e68b1dc2-d70d-4a89-a6c0-10507b257f83
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: 28aa4b09-685d-4268-aacc-7db0ac919b95
|
||||
uuid: df19211c-2485-44f6-bb2e-a92a6d5371d2
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: 928d9be5-ae4f-4460-8a6d-400ad5a1c54e
|
||||
uuid: e40f6f27-096f-4d03-a34f-afb8ae8be371
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: 43e1ab43-efa4-4544-90c5-2ecd7995ede9
|
||||
uuid: ce8a651c-fe72-4dad-b0c1-7661845c9ad2
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: faecdc1e-391b-4923-9973-789cab7f3610
|
||||
uuid: 8844be88-0ac5-4855-82ff-04b601da338f
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
|
@ -1,4 +1,4 @@
|
||||
uuid: 3c7e2d93-56a7-479e-9e9a-74578d456724
|
||||
uuid: 042a1da3-e723-451c-91ba-d3770e0e5071
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
|
@ -13,6 +13,7 @@ dependencies:
|
||||
- field.storage.node.field_projet
|
||||
- field.storage.node.field_projets_lies
|
||||
- field.storage.node.field_ressources_liees
|
||||
- field.storage.node.field_sous_titre
|
||||
- field.storage.node.field_theme
|
||||
- field.storage.node.field_themes_lies
|
||||
- field.storage.node.field_type_de_ressource
|
||||
@ -86,14 +87,13 @@ display:
|
||||
description: ''
|
||||
columns:
|
||||
node_bulk_form: node_bulk_form
|
||||
field_diaporama: field_diaporama
|
||||
field_image: field_image
|
||||
title: title
|
||||
field_type_de_ressource: title
|
||||
field_sous_titre: title
|
||||
operations: title
|
||||
field_programme: field_programme
|
||||
field_projet: field_projet
|
||||
field_theme: field_theme
|
||||
field_poid: field_poid
|
||||
status: status
|
||||
changed: changed
|
||||
field_memo: field_memo
|
||||
@ -103,7 +103,9 @@ display:
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
field_diaporama:
|
||||
field_image:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
@ -115,7 +117,7 @@ display:
|
||||
separator: '<br/>'
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
field_type_de_ressource:
|
||||
field_sous_titre:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
@ -148,13 +150,6 @@ display:
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
field_poid:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
status:
|
||||
sortable: true
|
||||
default_sort_order: asc
|
||||
@ -4356,14 +4351,14 @@ display:
|
||||
settings:
|
||||
link_to_entity: true
|
||||
plugin_id: field
|
||||
field_type_de_ressource:
|
||||
id: field_type_de_ressource
|
||||
table: node__field_type_de_ressource
|
||||
field: field_type_de_ressource
|
||||
field_sous_titre:
|
||||
id: field_sous_titre
|
||||
table: node__field_sous_titre
|
||||
field: field_sous_titre
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Type de ressource'
|
||||
label: 'Sous titre'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
@ -4404,11 +4399,11 @@ display:
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: entity_reference_label
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link: true
|
||||
group_column: target_id
|
||||
link_to_entity: false
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
@ -4658,133 +4653,6 @@ display:
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
field_ressources_liees:
|
||||
id: field_ressources_liees
|
||||
table: node__field_ressources_liees
|
||||
field: field_ressources_liees
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Ressources
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: entity_reference_label
|
||||
settings:
|
||||
link: true
|
||||
group_column: target_id
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: ul
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
field_poid:
|
||||
id: field_poid
|
||||
table: node__field_poid
|
||||
field: field_poid
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Poid
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: number_integer
|
||||
settings:
|
||||
thousand_separator: ''
|
||||
prefix_suffix: true
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
status:
|
||||
id: status
|
||||
table: node_field_data
|
||||
@ -4909,12 +4777,10 @@ display:
|
||||
tags:
|
||||
- 'config:field.storage.node.field_image'
|
||||
- 'config:field.storage.node.field_memo'
|
||||
- 'config:field.storage.node.field_poid'
|
||||
- 'config:field.storage.node.field_programme'
|
||||
- 'config:field.storage.node.field_projet'
|
||||
- 'config:field.storage.node.field_ressources_liees'
|
||||
- 'config:field.storage.node.field_sous_titre'
|
||||
- 'config:field.storage.node.field_theme'
|
||||
- 'config:field.storage.node.field_type_de_ressource'
|
||||
page_7:
|
||||
display_options:
|
||||
path: admin/content/actualites
|
||||
|
@ -41,86 +41,66 @@ process:
|
||||
source: nid
|
||||
no_stub: true
|
||||
|
||||
# field_theme:
|
||||
# plugin: migration_lookup
|
||||
# migration: d7_node_theme
|
||||
# source: field_theme
|
||||
# no_stub: true
|
||||
#
|
||||
# field_projet:
|
||||
# plugin: migration_lookup
|
||||
# migration: d7_node_projet
|
||||
# source: field_projet
|
||||
# no_stub: true
|
||||
#
|
||||
# field_poid: field_poids
|
||||
#
|
||||
# field_type_de_ressource:
|
||||
# plugin: migration_lookup
|
||||
# migration: d7_taxonomy_term_type_doc
|
||||
# source: field_popsu_doc_type
|
||||
# no_stub: true
|
||||
#
|
||||
# field_sous_titre:
|
||||
# plugin: sub_process
|
||||
# source: field_popsu_publication_soustitr
|
||||
# process:
|
||||
# value: value
|
||||
# # summary: summary
|
||||
# # format:
|
||||
# # plugin: default_value
|
||||
# # default_value: wysiwyg
|
||||
#
|
||||
# field_edition:
|
||||
# plugin: sub_process
|
||||
# source: field_popsu_doc_source
|
||||
# process:
|
||||
# value: value
|
||||
# summary: summary
|
||||
# format:
|
||||
# plugin: default_value
|
||||
# default_value: wysiwyg
|
||||
#
|
||||
# body:
|
||||
# plugin: sub_process
|
||||
# source: body
|
||||
# process:
|
||||
# value: value
|
||||
# summary: summary
|
||||
# format:
|
||||
# plugin: default_value
|
||||
# default_value: wysiwyg
|
||||
#
|
||||
#
|
||||
# field_image:
|
||||
# plugin: sub_process
|
||||
# source: field_popsu_publication_cover
|
||||
# process:
|
||||
# target_id:
|
||||
# plugin: migration_lookup
|
||||
# migration: d7_allpublicfiles
|
||||
# source: fid
|
||||
# no_stub: true
|
||||
# alt: alt
|
||||
# title: title
|
||||
#
|
||||
# field_fichier:
|
||||
# plugin: sub_process
|
||||
# source: field_popsu_doc_files
|
||||
# process:
|
||||
# target_id:
|
||||
# plugin: migration_lookup
|
||||
# migration: d7_allpublicfiles
|
||||
# source: fid
|
||||
# no_stub: true
|
||||
# display: display
|
||||
# description: description
|
||||
#
|
||||
# field_ressources_liees:
|
||||
# plugin: migration_lookup
|
||||
# migration: d7_node_ressource
|
||||
# source: field_projet
|
||||
# no_stub: true
|
||||
field_theme:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_theme
|
||||
source: field_theme
|
||||
no_stub: true
|
||||
|
||||
field_projet:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_projet
|
||||
source: field_projet
|
||||
no_stub: true
|
||||
|
||||
field_sous_titre: field_popsu_colloque_subtitle
|
||||
|
||||
field_intro:
|
||||
plugin: sub_process
|
||||
source: field_popsu_colloque_subtitle2
|
||||
process:
|
||||
value: value
|
||||
summary: summary
|
||||
format:
|
||||
plugin: default_value
|
||||
default_value: wysiwyg
|
||||
|
||||
body:
|
||||
plugin: sub_process
|
||||
source: body
|
||||
process:
|
||||
value: value
|
||||
summary: summary
|
||||
format:
|
||||
plugin: default_value
|
||||
default_value: wysiwyg
|
||||
|
||||
# NO ITEM
|
||||
field_image:
|
||||
plugin: sub_process
|
||||
source: field_popsu_colloque_imageintro
|
||||
process:
|
||||
target_id:
|
||||
plugin: migration_lookup
|
||||
migration: d7_allpublicfiles
|
||||
source: fid
|
||||
no_stub: true
|
||||
alt: alt
|
||||
title: title
|
||||
|
||||
# NO ITEM
|
||||
field_ressources_liees:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_ressource
|
||||
source: field_ressource
|
||||
no_stub: true
|
||||
|
||||
# NO ITEM
|
||||
field_evenements_liees:
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_evenement
|
||||
source: field_evenement
|
||||
no_stub: true
|
||||
|
||||
field_memo: field_memo
|
||||
|
||||
|
@ -91,7 +91,7 @@ class D7NodeEvenement extends FieldableEntity {
|
||||
'log',
|
||||
'timestamp',
|
||||
])
|
||||
->orderBy('type', 'ASC');
|
||||
->orderBy('type', 'DESC');
|
||||
|
||||
$query->addField('n', 'uid', 'node_uid');
|
||||
$query->addField('nr', 'uid', 'revision_uid');
|
||||
@ -121,8 +121,8 @@ class D7NodeEvenement extends FieldableEntity {
|
||||
$field_values = $this->getFieldValues('node', $field_name, $nid, $vid, NULL);
|
||||
$row->setSourceProperty($field_name, $field_values);
|
||||
switch ($field_name) {
|
||||
case 'field_popsu_publication_body':
|
||||
case 'field_popsu_doc_body':
|
||||
case 'field_popsu_colloque_body':
|
||||
case 'body':
|
||||
$row->setSourceProperty("body", $field_values);
|
||||
break;
|
||||
}
|
||||
@ -131,7 +131,12 @@ class D7NodeEvenement extends FieldableEntity {
|
||||
if ($type === "popsu_colloque") {
|
||||
// programme
|
||||
$field_programme = $row->getSourceProperty('field_popsu_colloque_popsu');
|
||||
|
||||
// projet
|
||||
// field_popsu_colloque_ville is not a projet but a ville
|
||||
if ($node = $row->getSourceProperty('field_popsu_colloque_ref')[0]) {
|
||||
$node['target_id'] = $node['nid'];
|
||||
$row->setSourceProperty('field_projet', $node);
|
||||
}
|
||||
} else { // evenement
|
||||
$field_popsu_doc_parent = $row->getSourceProperty('field_popsu_doc_parent');
|
||||
// get the node_type of doc_parent
|
||||
@ -145,32 +150,41 @@ class D7NodeEvenement extends FieldableEntity {
|
||||
// }
|
||||
switch ($node['type']) {
|
||||
// programme
|
||||
case 'popsu_special': // NO ITEM
|
||||
case 'popsu_page': //NO ITEM
|
||||
Drush::output()->writeln(dump($node));
|
||||
// case 'popsu_special': // NO ITEM
|
||||
// case 'popsu_page': //NO ITEM
|
||||
// Drush::output()->writeln(dump($node));
|
||||
// break;
|
||||
// projet
|
||||
// case 'popsu_page_neutral': // no ref in migration
|
||||
// case 'popsu_projet_europe': // merged with popsu_ville_europe
|
||||
case 'popsu_ville_europe':
|
||||
case 'popsu_ville':
|
||||
case 'popsu_projet':
|
||||
// Drush::output()->writeln(dump($node));
|
||||
$node['target_id'] = $node['nid'];
|
||||
$row->setSourceProperty('field_projet', $node);
|
||||
break;
|
||||
// // projet
|
||||
// // case 'popsu_page_neutral': // no ref in migration
|
||||
// // case 'popsu_projet_europe': // merged with popsu_ville_europe
|
||||
// case 'popsu_ville_europe':
|
||||
// case 'popsu_ville':
|
||||
// case 'popsu_projet':
|
||||
// // Drush::output()->writeln(dump($node));
|
||||
// $node['target_id'] = $node['nid'];
|
||||
// $row->setSourceProperty('field_projet', $node);
|
||||
// break;
|
||||
// // Theme
|
||||
// case 'popsu_theme_europe':
|
||||
// case 'popsu_theme_trans':
|
||||
// case 'popsu_theme_local':
|
||||
// $node['target_id'] = $node['nid'];
|
||||
// $field_theme = $node;
|
||||
// break;
|
||||
// // publication
|
||||
// case 'popsu_publication':
|
||||
// $node['target_id'] = $node['nid'];
|
||||
// $row->setSourceProperty('field_ressources_liees', $node);
|
||||
// break;
|
||||
// Theme // NO ITEMS
|
||||
case 'popsu_theme_europe':
|
||||
case 'popsu_theme_trans':
|
||||
case 'popsu_theme_local':
|
||||
// $node['target_id'] = $node['nid'];
|
||||
Drush::output()->writeln(dump($node));
|
||||
$row->setSourceProperty('field_theme', $node);
|
||||
break;
|
||||
// publication // NO ITEM
|
||||
case 'popsu_publication':
|
||||
$node['target_id'] = $node['nid'];
|
||||
// Drush::output()->writeln(dump($node));
|
||||
$row->setSourceProperty('field_ressource', $node);
|
||||
break;
|
||||
// evenement // NO ITEM
|
||||
case 'popsu_colloque':
|
||||
$node['target_id'] = $node['nid'];
|
||||
Drush::output()->writeln(dump($node));
|
||||
$row->setSourceProperty('field_evenement', $node);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,10 +215,6 @@ class D7NodeEvenement extends FieldableEntity {
|
||||
$row->setSourceProperty('field_programme', array(array('nid'=>$prog[0]['nid'])));
|
||||
}
|
||||
|
||||
if (!empty($field_theme)) {
|
||||
// Drush::output()->writeln(dump($field_theme));
|
||||
$row->setSourceProperty('field_theme', $field_theme);
|
||||
}
|
||||
|
||||
// record migration errors in field_memo
|
||||
if(isset($memo)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user