6

Using Drupal 8, I need to create several content types. They'll be used in a multilingual site, so I installed the Configuration Translation module from the core to translate the field labels. I can succesfully do that, but I need to create a feature (using Features module from the core) to export the content types and import them easily in the production site.

The problem is that the Features module doesn't export the configuration translation, even including the languages in the feature.

Is there any way to export the content types with their configuration translation and import them seamlessly into another site?

Exporting the entire site with the Configuration Synchronization seems to do the trick, but is more difficult to import because requires a clone site, and I only want the content types.

1

Anyway. You can back up the database with the back up and migrate module and import to your live site. The other tool can be drush cex for exporting configuration and drush cim for importing it.

0

Here's something you should consider trying:

  • Export configuration from the source site.
  • In the directory where you exported the configuration, select the YML files you want to import into the second site.
  • Move / copy the files into a separate directory.
  • Now, you will have to manipulate the UUID for the configs so that they become compatible with the destination site.
  • Once you change the UUIDs to match those of the destination site, you should be able to import them to the destination site.

Hope it helps.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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