Commit 66800acd authored by alexpott's avatar alexpott

Issue #2121299 by andypost, bdone, benjy, penyaskito, chx, claudiu.cristea,...

Issue #2121299 by andypost, bdone, benjy, penyaskito, chx, claudiu.cristea, damiankloip, gregboggs, InternetDevels, jessehs, jhedstrom, marvil07, mikeryan, pcambra, Xano, YesCT, axoplasm, kgoel, dclavain, jeckman, alvar0hurtad0, Drupali, fastangel, gloob, jhedstrom, joshtaylor, mpgeek, alexpott: Migrate Drupal 6 to Drupal 8
parent dc6aa5ba
......@@ -6,6 +6,7 @@
*/
namespace Drupal\migrate\Tests;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\migrate\Source;
......
id: d6_action_settings
label: Drupal 6 action configuration
source:
plugin: variable
variables:
......
id: d6_aggregator_feed
label: Drupal 6 aggregator feeds
source:
plugin: d6_aggregator_feed
process:
fid: fid
title: title
url: url
refresh: refresh
checked: checked
link: link
description: description
image: image
etag: etag
modified: modified
destination:
plugin: entity:aggregator_feed
id: d6_aggregator_item
label: Drupal 6 aggregator items
source:
plugin: d6_aggregator_item
process:
iid: iid
fid:
plugin: migration
migration: d6_aggregator_feed
source:
- fid
title: title
link: link
author: author
description: description
timestamp: timestamp
guid: guid
destination:
plugin: entity:aggregator_item
migration_dependencies:
- d6_aggregator_feed
id: d6_aggregator_settings
label: Drupal 6 aggregator configuration
source:
plugin: variable
variables:
......
id: d6_block
label: Drupal 6 blocks
source:
plugin: d6_block
process:
id:
# We need something unique, so aggregator, aggregator_1 etc will do.
plugin: dedupe_entity
entity_type: block
field: id
postfix: _
source: module
plugin:
-
plugin: static_map
bypass: true
source:
- module
- delta
map:
book:
0: book_navigation
comment:
0: views_block:comments_recent-block_1
forum:
0: forum_active_block
1: forum_new_block
locale:
0: language_block
node:
0: node_syndicate_block
search:
0: search_form_block
statistics:
0: statistics_popular_block
system:
0: system_powered_by_block
user:
0: user_login_block
1: system_menu_block:tools
2: views_block:who_s_new-block_1
3: views_block:who_s_online-who_s_online_block
-
plugin: d6_block_plugin_id
region: region
theme: theme
label: title
'visibility.path.visibility': visibility
'visibility.path.pages': pages
'visibility.role.roles': roles
weight: weight
settings:
plugin: d6_block_settings
source:
- @plugin
- delta
- settings
destination:
plugin: entity:block
migration_dependencies:
- d6_menu: false
id: d6_book
label: Drupal 6 books
source:
plugin: d6_book
process:
nid: nid
book.bid: bid
book.weight: weight
book.pid:
-
plugin: skip_process_on_empty
source: plid
-
plugin: migration
migration: d6_book
destination:
plugin: book
migration_dependencies:
- d6_node
id: d6_book_settings
label: Drupal 6 book configuration
source:
plugin: variable
variables:
......
id: d6_cck_field_revision
label: Drupal 6 field revisions
load:
plugin: drupal_entity
bundle_migration: d6_node_type
source:
plugin: d6_cck_field_revision
process:
vid: vid
destination:
plugin: entity_revision:node
migration_dependencies:
- d6_cck_field_values
- d6_node_revision
id: d6_cck_field_values
label: Drupal 6 field values
load:
plugin: drupal_entity
bundle_migration: d6_node_type
source:
plugin: d6_cck_field_values
process:
nid:
plugin: migration
migration: d6_node
source: nid
destination:
plugin: entity:node
migration_dependencies:
- d6_node
- d6_field_formatter_settings
- d6_field_instance_widget_settings
id: d6_comment
label: Drupal 6 comments
source:
plugin: d6_comment
constants:
field_id: node__comment
entity_type: node
process:
cid: cid
pid:
-
plugin: skip_process_on_empty
source: pid
-
plugin: migration
migration: d6_comment
entity_id:
plugin: migration
migration: d6_node
source: nid
entity_type: constants.entity_type
field_id: constants.field_id
subject: subject
uid:
-
plugin: skip_process_on_empty
source: uid
-
plugin: migration
migration: d6_user
name: name
mail: mail
homepage: homepage
hostname: hostname
created: timestamp
changed: timestamp
status: status #In D6, published=0. We reverse the value in prepareRow.
thread: thread
'comment_body.value': comment
'comment_body.format':
plugin: migration
migration: d6_filter_format
source: format
destination:
plugin: entity:comment
migration_dependencies:
- d6_node
- d6_user
- d6_comment_entity_display
- d6_comment_entity_form_display
- d6_filter_format
id: d6_comment_entity_display
label: Drupal 6 comment display configuration
source:
plugin: d6_comment_variable
constants:
entity_type: node
field_name: comment
view_mode: default
options:
label: hidden
type: comment_default
weight: 20
process:
entity_type: constants.entity_type
field_name: constants.field_name
view_mode: constants.view_mode
options: constants.options
bundle: node_type
destination:
plugin: component_entity_display
migration_dependencies:
- d6_comment_field_instance
id: d6_comment_entity_form_display
label: Drupal 6 comment form display configuration
source:
plugin: d6_comment_variable
constants:
entity_type: node
field_name: comment
form_mode: default
options:
type: comment_default
weight: 20
process:
entity_type: constants.entity_type
field_name: constants.field_name
form_mode: constants.form_mode
options: constants.options
bundle: node_type
destination:
plugin: component_entity_form_display
migration_dependencies:
- d6_comment_field_instance
id: d6_comment_field
label: Drupal 6 comment field configuration
source:
plugin: d6_comment_variable
constants:
entity_type: node
type: comment
id: node.comment
name: comment
process:
entity_type: constants.entity_type
id: constants.id
name: constants.name
type: constants.type
destination:
plugin: entity:field_config
id: d6_comment_field_instance
label: Drupal 6 comment field instance configuration
source:
plugin: d6_comment_variable
constants:
entity_type: node
field_name: comment
label: Comment settings
required: true
process:
entity_type: constants.entity_type
field_name: constants.field_name
label: constants.label
required: constants.required
bundle: node_type
'default_value.0.status': comment
'settings.default_mode': comment_default_mode
'settings.per_page': comment_default_per_page
'settings.anonymous': comment_anonymous
'settings.subject': comment_subject_field
'settings.form_location': comment_form_location
'settings.preview': comment_preview
destination:
plugin: entity:field_instance_config
migration_dependencies:
- d6_comment_field
- d6_node_type
id: d6_contact_category
label: Drupal 6 contact category configuration
source:
plugin: d6_contact_category
process:
id:
-
plugin: machine_name
source: category
-
plugin: dedupe_entity
entity_type: user_role
field: cid
label: category
recipients: recipients
reply: reply
weight: weight
destination:
plugin: entity:contact_category
id: d6_contact_settings
label: Drupal 6 contact configuration
source:
plugin: variable
variables:
......
id: d6_custom_block
label: Drupal 6 custom blocks
source:
plugin: d6_box
constants:
type: basic
process:
id: bid
type: constants.type
info: info
'body.format':
plugin: migration
migration: d6_filter_format
source: format
'body.value': body
destination:
plugin: entity:custom_block
migration_dependencies:
- d6_filter_format
id: d6_date_formats
label: Drupal 6 date format configuration
source:
plugin: variable_multirow
variables:
- date_format_long
- date_format_medium
- date_format_short
process:
id:
plugin: static_map
source: name
map:
date_format_long: long
date_format_short: short
date_format_medium: medium
'pattern.php': value
destination:
plugin: entity:date_format
id: d6_dblog_settings
label: Drupal 6 database logging configuration
source:
plugin: variable
variables:
......
id: d6_field
label: Drupal 6 field configuration
source:
plugin: d6_field
constants:
entity_type: node
langcode: und
process:
entity_type: constants.entity_type
status: active
langcode: constants.langcode
name: field_name
type:
-
plugin: static_map
bypass: true
source:
- type
map:
number_integer: integer
number_decimal: decimal
number_float: float
text: text
email: email
link: link
date: datetime
datestamp: datetime
datetime: datetime
fr_phone: telephone
be_phone: telephone
it_phone: telephone
el_phone: telephone
ch_phone: telephone
ca_phone: telephone
cr_phone: telephone
pa_phone: telephone
gb_phone: telephone
ru_phone: telephone
ua_phone: telephone
es_phone: telephone
au_phone: telephone
cs_phone: telephone
hu_phone: telephone
pl_phone: telephone
nl_phone: telephone
se_phone: telephone
za_phone: telephone
il_phone: telephone
nz_phone: telephone
br_phone: telephone
cl_phone: telephone
cn_phone: telephone
hk_phone: telephone
mo_phone: telephone
ph_phone: telephone
sg_phone: telephone
jo_phone: telephone
eg_phone: telephone
pk_phone: telephone
int_phone: telephone
-
plugin: file_image_handler
cardinality:
plugin: static_map
bypass: true
source: multiple
map:
0: 1
1: -1
settings:
plugin: field_settings
source:
- @type
- global_settings
- widget_settings
destination:
plugin: entity:field_config
migration_dependencies:
# It is not possible to make this a requirement as d6_field_settings has no
# source id. However it also has no requirements so it will always run so a
# dependency is enough.
- d6_field_settings: false
id: d6_field_formatter_settings
label: Drupal 6 field formatter configuration
source:
plugin: d6_field_instance_per_view_mode
constants:
entity_type: node
process:
# We skip field types that don't exist because they weren't migrated by the
# field migration.
field_type_exists:
-
plugin: migration
migration: d6_field
source:
- field_name
-
plugin: extract
index:
- 1