I am exporting a content type and field associated with the synchronize option available in Drupal 8. I exported and imported the YAML code for content type successfully. When I was about to do the same for the field, I noticed a 'field storage' in the configuration type? What is the difference between the 'field' and 'field storage' configuration type and do I need to export code corresponding to both configuration type? Below is the configuration file for the same field - 'field_countries' The field storage configuration is as below

uuid: 2dbe8304-1cdf-4c11-8b2c-09e2a8e59213
langcode: en
status: true
    - node
id: node.field_countries
field_name: field_countries
entity_type: node
type: string
  max_length: 255
  is_ascii: false
  case_sensitive: false
module: core
locked: false
cardinality: -1
translatable: true
indexes: {  }
persist_with_no_fields: false
custom_storage: false

The field configuration is as follows

uuid: 74ef1365-f21e-4ac4-9ac3-de208d8ba96b
langcode: en
status: true
    - field.storage.node.field_countries
    - node.type.bookshare_title_metadata
id: node.bookshare_title_metadata.field_countries
field_name: field_countries
entity_type: node
bundle: bookshare_title_metadata
label: countries
description: ''
required: false
translatable: false
default_value: {  }
default_value_callback: ''
settings: {  }
field_type: string
  • 2
    As you might know, fields can be reused across bundles (content types) of the same entity. A field storage configuration holds 'global' settings for all these fields but does not make them available to entities or bundles, A field configuration is specific for one bundle and 'glues' the field storage information and the entity bundle together (optionally overriding some of the settings). If you are exporting and importing, you need both. – Neograph734 Nov 23 '18 at 23:04
  • Thanks. When i import the field say 'added by' it is successfully done and for the same field I am importing the field storage and I receive an error message there are no changes to the import. – Akhil Mohandas Nov 26 '18 at 16:08
  • That is a different question, which could have a lot of causes and is hard to debug without access to the site. You could try posting that as a new question (or search if similar questions have been asked before) . Personally I'd expect the field storage to be a requirement for the field configuration, so that should have been imported first. – Neograph734 Nov 26 '18 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.