Problem/Motivation
Consider this workflow:
1. developer creates a new taxonomy term on their local environment
2. our module adds the two fields "field_allowed_users" and "field_allowed_roles" automatically to the newly created vocabulary
3. developer commits the resulting config change, that includes the two new fields
4. developer deploys the change to the dev/staging version of the site
During configuration import:
1. the site creates the new taxonomy dictionary
2. the module adds the fields to it like in the step 2 above
3. the site configuration import process also tries to create the fields because they were exported into the configuration
4. config import fails with this error:
In ConfigImportCommands.php line 290:
The import failed due to the following reasons:
Deleted and replaced configuration entity "field.field.taxonomy_term.locale.field_allowed_users"
Deleted and replaced configuration entity "field.field.taxonomy_term.locale.field_allowed_roles"
Deleted and replaced configuration entity "core.entity_form_display.taxonomy_term.locale.default"
Proposed resolution
We should detect whether a taxonomy term is created as part of a configuration import, and not add the fields in that case.
Issue fork access_by_taxonomy-3549276
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
vermario commented