0

I've created a view that I then turned into a 'Feature.' I then successfully added this feature to a second site by copying the module files from the first site into the module folder of the second. Only the first-site has the D8 Features Module.

Then on the first site I changed the Title of the View and went through the process of detecting the change and regenerating the Feature:

  1. Edit the view with the new title
  2. Go to the Features Config page where the state of the feature shows "Changed"
  3. Import the code back into the database (i.e. 'revert')
  4. Re-re-edit the view title
  5. Export the view as a feature

Now I want to import the changes of the first-site Feature into second-site Feature.

  1. Uninstall the imported/copied module from second-site
  2. Replace module folder of second site w/ new module from first-site
  3. Re-install the module

I then receive a long error:

Unable to install My Image Gallery, core.base_field_override.node.my_image.promote, core.entity_form_display.node.my_image.default, core.entity_view_display.node.my_image.default, core.entity_view_display.node.my_image.teaser, field.field.node.my_image.body, field.field.node.my_image.field_my_image_field, field.storage.node.field_my_image_field, node.type.my_image already exist in active configuration.

Obviously there is a problem with either my procedure or my understanding of how to use the 'Feature' feature of Drupal 8, or I have a misconception of what it's supposed to do. Any help would be appreciated.

1 Answer 1

0

Procedurally, you should skip steps 3 and 4 in the first list. For views, reverting will delete the view's config from the database, which is why you had to re-re-edit the title. FYI, reverting works differently for other objects.

In some cases (e.g. views), the revert operation will delete the respective configuration in the database, so the system will instead use the default configuration that is defined in the feature module's code.

https://www.drupal.org/node/582680

I am not sure what caused the error you received. It might be related to the steps you used. I'd try again and see what happens. :)

Your Answer

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

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