Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing/Exporting taxonomy terms between Dev and Prod environment #144

Closed
patrickkaleta opened this issue Mar 9, 2020 · 0 comments
Closed

Comments

@patrickkaleta
Copy link
Contributor

patrickkaleta commented Mar 9, 2020

UPDATE: This will serve as a plan B. The preferred way for importing/exporting taxonomy terms will be via Migrate, since that is also used for synchronizing content types.

For the import and export of taxonomy terms (EU-GL definitions, Study type definitions, hazards, el. at risk,...) we can use the Structure sync module as an alternative to the Migrate module in Drupal 8, which can migrate taxonomy terms, as well as other content types (that's why the Migrate module is going to be the preferred solution).

How to use

  1. in the BE navigate to Structure -> Structure Sync -> Taxonomies and export ALL taxonomies
  2. via Drush export and import the Drupal configurations, which now also contain the taxonomies (see Importing/Exporting configuration between Dev and Prod environment #138 for details on how to migrate configuration)
  3. run in target environment Drush command drush import-taxonomies and select the "Full" option for the import

How it works

  • the module stores taxonomies in the same sync folder, where all the other configuration is stored
  • only the "Full" import makes sure that not only completely new taxonomy terms are imported but also existing once get updated if they contain changes
  • however, on "Full import" taxonomy terms that are not in the configuration folder, will be removed and that is why it is necessary to select all taxonomies in the export step every time a migration should take place
  • as a result the process is very inefficient and takes a couple of minutes to finish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant