0

So I built my own custom entity type (we'll call it notes). And on my notes I have fields that use taxonomy terms, however when it comes to exporting the data out on individual fields, it shows the data, but when I restart the site and re-import everything, the taxonomy terms don't get imported with it.

Taxonomy terms is pretty important and a core with Drupal, so I don't understand why we can't export and import them easily like with the other data.

So I end up with fields that do not have taxonomy terms or is reported as missing.

Is there a way I can do this so when I import, the taxonomy terms get imported too?

2

The line between config/content can be blurry since there are many use scenarios. Drupal assumes a default scenario where terms are user-edited content that's not part of the CMS configuration.

Taxonomy terms are content entities, unlike taxonomy vocabularies, which are config entities. Hence, the D8 configuration export/import will not work for taxonomy terms.

There are various modules that will let you import content (and thus taxonomy terms). Some are more general-purpose (e.g. the migration framework, the content sync module), others are specific to taxonomy (e.g. taxonomy import module). Research solutions and figure out what works best for your scenario.

| improve this answer | |
0

Have a look at the YAML Content. Even if it is not covered by the Drupal Security, it may cover your current needs as it will help you exporting and importing your terms.

| improve this answer | |

Your Answer

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

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