0

I have created a new custom block type and added some fields to it. I am able to export and import the custom block type in another Drupal instance via configuration management, but there are no fields.

How do I import the fields too?

1 Answer 1

2

The field definitions are in their own yml-files. To check this, export the full archive and search for the dependencies. For example the body of the block content type basic has this yml-file:

field.field.block_content.basic.body.yml

and there you find the dependencies for the block content type:

dependencies:
  config:
    - block_content.type.basic
4
  • I did not get you. What have to done for field migration along with custom block type. Nov 30, 2015 at 9:06
  • You have to export and import field.field.block_content.[custom_block_type].*.yml
    – 4uk4
    Nov 30, 2015 at 10:00
  • I have exported and imported the same, i got the custom block type but not the fields added to it. Nov 30, 2015 at 10:29
  • You also need the field.storage definitions and the form_display and view_display configurations. There are some existing rather detailed answers already for that topic. They are for nodes, but it's the same.
    – Berdir
    Nov 30, 2015 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.