Since Drupal 8.6.0, it is recommended that configuration entity types include the config_export property in their annotation.

See change record: Move schema fallback from ConfigEntity::toArray() to ConfigEntityType::getPropertiesToExport()

There is an example of this in the handbook page: Creating a configuration entity type.

CommentFileSizeAuthor
#3 3158628-3.patch699 bytesandrewmacpherson
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

Without the config_export property in the entity type annotation, you'll get errors when performing a site install from existing config (drush site-install --use-existing):

[error]  Unexpected error during import with operation create for environment_indicator.switcher.dev: Entity type 'Drupal\Core\Config\Entity\ConfigEntityType' is missing 'config_export' definition in its annotation 
 [error]  Unexpected error during import with operation create for environment_indicator.switcher.live: Entity type 'Drupal\Core\Config\Entity\ConfigEntityType' is missing 'config_export' definition in its annotation 

I noticed this during rehearsal for a Drupal 9 upgrade, but I haven't seen the errors when using D8.

andrewmacpherson’s picture

FileSize
699 bytes
andrewmacpherson’s picture

Status: Active » Needs review
e0ipso’s picture

This looks good to me. Thanks for the patch!

e0ipso’s picture

Status: Needs review » Reviewed & tested by the community

pratik_kamble’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @andrewmacpherson and @e0ipso I have committed the patch to 4.x dev branch.

Status: Fixed » Closed (fixed)

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

JFeltkamp’s picture

Patch #3 works for mee too