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.

CommentFileSizeAuthor
#2 3514008-1.patch1.37 KBulaire

Comments

ulaire created an issue. See original summary.

ulaire’s picture

StatusFileSize
new1.37 KB
albert volkman’s picture

Status: Active » Reviewed & tested by the community

Works for me.

  • vuil committed 836a1186 on 4.0.x
    Issue #3514008 by ulaire, albert volkman, vuil: Automatically created...
vuil’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.