0

I have a Drupal 8 site with a contact form that has a lot of fields. I need to duplicate these fields onto another Drupal 8 site but can't find where they are stored in the DB.

In the config table there is a row per field, but when I try to copy these across, I get this message:

Drupal\Core\Field\FieldException: Attempt to create a field my_field_name that does not exist on entity type contact_message. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 286 of core/modules/field/src/Entity/FieldConfig.php).

Does anyone know if it's possible to copy the contact form fields to another site via the Database?

1 Answer 1

1

Yes. One way could be:

  1. You export your configuration. (drush cex -y, or on the interface configuration management)
  2. You filter the configuration you need.
  3. You import those configuration files into the other site (drush cim, or manually).

Your Answer

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

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