Problem/Motivation
Certain modules (like Domain for instance) automatically add fields upon content type creation, leading to an error when this module wants to add it again.
The website encountered an unexpected error. Try again later.Drupal\Core\Entity\EntityStorageException: 'field_config' entity with ID 'node.[node-type].field_domain_access' already exists. in Drupal\Core\Entity\EntityStorageBase->doPreSave() (line 519 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).
Steps to reproduce
Install this module next to the domain module (including the domain_access submodule).
Proposed resolution
Add an extra check during cloning to see if a field already exist.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3514008-1.patch | 1.37 KB | ulaire |
Comments
Comment #2
ulaire commentedComment #3
albert volkman commentedWorks for me.
Comment #5
vuil