We are using D8's Configuration Management for our site. When we delete fields in our local development environment the corresponding content type and field yml files are updated to reflect the change. However when we deploy these changes to our production environment, the field is not deleted. It is simply moved to the hidden (Disabled) spot for the content type under manage fields.
As a result we have to manually go in and delete the field in production. How can we delete the fields on production when new configuration files are deployed?
Deployment process:
- In our local environment, make the changes by deleting the fields
- Export config into the config/sync folder and commit into git
- Deploy branch with latest updates to config/sync folder to Cloud environment such as production
- run
drush config-import
and select the vcs option (to import from git) - navigate to the content type and verify changes
- observe that the field is hidden, not deleted.
config/sync
directory on production before copying & importing? Deleting a field means (at least) one less file, so you need to make sure not just to overwrite existing files, but also to remove obsolete files. – Hudri Mar 8 '18 at 0:27