From 71d407fefd90e2c215c4760d2af2767e67b58780 Mon Sep 17 00:00:00 2001 From: David Valdez Date: Thu, 30 Aug 2018 12:53:40 -0500 Subject: [PATCH] Migrate the field_file and field_image in the pages. --- ....entity_form_display.node.page.default.yml | 20 ++++++++++ ....entity_view_display.node.page.default.yml | 25 +++++++++++- .../sync/field.field.node.page.field_file.yml | 27 +++++++++++++ .../field.field.node.page.field_image.yml | 38 +++++++++++++++++++ config/sync/field.storage.node.field_file.yml | 23 +++++++++++ .../sync/field.storage.node.field_image.yml | 4 +- .../migrations/agaric_page.yml | 21 ++++++++++ 7 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 config/sync/field.field.node.page.field_file.yml create mode 100644 config/sync/field.field.node.page.field_image.yml create mode 100644 config/sync/field.storage.node.field_file.yml diff --git a/config/sync/core.entity_form_display.node.page.default.yml b/config/sync/core.entity_form_display.node.page.default.yml index 135c222..03be2f3 100644 --- a/config/sync/core.entity_form_display.node.page.default.yml +++ b/config/sync/core.entity_form_display.node.page.default.yml @@ -5,11 +5,16 @@ dependencies: config: - field.field.node.page.body - field.field.node.page.field_body_paragraph + - field.field.node.page.field_file + - field.field.node.page.field_image - field.field.node.page.field_meta_tags - field.field.node.page.field_storyline - field.field.node.page.field_summary + - image.style.thumbnail - node.type.page module: + - file + - image - metatag - paragraphs - path @@ -39,6 +44,21 @@ content: third_party_settings: { } type: entity_reference_paragraphs region: content + field_file: + weight: 27 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_image: + weight: 26 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content field_meta_tags: weight: 6 settings: { } diff --git a/config/sync/core.entity_view_display.node.page.default.yml b/config/sync/core.entity_view_display.node.page.default.yml index c9b0549..9ad788f 100644 --- a/config/sync/core.entity_view_display.node.page.default.yml +++ b/config/sync/core.entity_view_display.node.page.default.yml @@ -5,11 +5,16 @@ dependencies: config: - field.field.node.page.body - field.field.node.page.field_body_paragraph + - field.field.node.page.field_file + - field.field.node.page.field_image - field.field.node.page.field_meta_tags + - field.field.node.page.field_storyline - field.field.node.page.field_summary - node.type.page module: - ds + - file + - image - user third_party_settings: ds: @@ -34,10 +39,28 @@ id: node.page.default targetEntityType: node bundle: page mode: default -content: { } +content: + field_file: + weight: 2 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + field_image: + weight: 1 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content hidden: body: true field_body_paragraph: true field_meta_tags: true + field_storyline: true field_summary: true links: true diff --git a/config/sync/field.field.node.page.field_file.yml b/config/sync/field.field.node.page.field_file.yml new file mode 100644 index 0000000..f1c58e3 --- /dev/null +++ b/config/sync/field.field.node.page.field_file.yml @@ -0,0 +1,27 @@ +uuid: f2978e92-efe9-45a5-b412-5e3e5ac98681 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_file + - node.type.page + module: + - file +id: node.page.field_file +field_name: field_file +entity_type: node +bundle: page +label: file +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt pdf svg rtf odt odp ppt' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/config/sync/field.field.node.page.field_image.yml b/config/sync/field.field.node.page.field_image.yml new file mode 100644 index 0000000..8d66b2c --- /dev/null +++ b/config/sync/field.field.node.page.field_image.yml @@ -0,0 +1,38 @@ +uuid: 16782cd7-a9f3-4cf1-8e5b-eba74b6f239c +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_image + - node.type.page + module: + - image +id: node.page.field_image +field_name: field_image +entity_type: node +bundle: page +label: Image +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/config/sync/field.storage.node.field_file.yml b/config/sync/field.storage.node.field_file.yml new file mode 100644 index 0000000..719e8c4 --- /dev/null +++ b/config/sync/field.storage.node.field_file.yml @@ -0,0 +1,23 @@ +uuid: 84ea971d-b192-4165-8178-ebf05f57662b +langcode: en +status: true +dependencies: + module: + - file + - node +id: node.field_file +field_name: field_file +entity_type: node +type: file +settings: + display_field: true + display_default: false + uri_scheme: public + target_type: file +module: file +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_image.yml b/config/sync/field.storage.node.field_image.yml index 8d8dfd4..5b87be8 100644 --- a/config/sync/field.storage.node.field_image.yml +++ b/config/sync/field.storage.node.field_image.yml @@ -15,7 +15,7 @@ type: image settings: uri_scheme: public default_image: - uuid: null + uuid: '' alt: '' title: '' width: null @@ -25,7 +25,7 @@ settings: display_default: false module: image locked: false -cardinality: 1 +cardinality: -1 translatable: true indexes: target_id: diff --git a/web/modules/custom/agaric_migration/migrations/agaric_page.yml b/web/modules/custom/agaric_migration/migrations/agaric_page.yml index 626a0cf..714644a 100644 --- a/web/modules/custom/agaric_migration/migrations/agaric_page.yml +++ b/web/modules/custom/agaric_migration/migrations/agaric_page.yml @@ -35,6 +35,27 @@ process: process: target_id: '0' target_revision_id: '1' + field_image: + - + plugin: iterator + source: field_image + process: + target_id: + plugin: migration_lookup + migration: agaric_file + source: fid + alt: alt + title: title + height: height + width: width + field_file: + - + plugin: iterator + source: field_file + process: + target_id: + plugin: migration_lookup + source: fid status: status created: created changed: changed