We use the Default Content module to install default content on each new site of our multi-site Drupal platform. Version 2 changed to only use UUID of the content you are exporting (done from the local development environment to generate content). However, some of our default content are items like vocabulary terms which are then related to the node. But this is no longer exporting the ID, so the ID when created in the new site can be different and now the newly created node on the site has a vocabulary term that it shouldn't.

How do related entities work with uuid? If a new taxonomy term is created and then used in a node, the node stores the "ID" of the taxonomy term. How will that term get exported and created with the proper IDs so that the node will have the proper value in the entity field?

  • The module uses UUID for any exported entity, and set the UUID after creating the imported entity, throwing an error if the UUID is already used on the site. In this way, the imported entities are recreated as they were on the site where they have been exported.
    – apaderno
    Aug 28 '21 at 15:00
  • Understandable. I’m creating a brand new site that will include views with preset filters of taxonomy terms. Everything has to done from local before being deployed to the server. Since terms are content, I have to have this ready with the installation of the site. And I am still creating features locally, so I must often test a rebuild. Views are not filtering on the UUID. My current work around is deploy hook and manually creating the content, so I didn’t use default content module for this. But I’m thinking of other applications as well.
    – shelane
    Aug 31 '21 at 1:10

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.