EntityAPIController::create() sets an is_new flag, but only if the entity type has a custom 'entity class' set. Because of this, exportables support fails for entity types that don't use a custom class. The is_new flag is not set so an update rather than insert is triggered. As there's nothing to update, the code-based entity is not created.

Ran into this problem when trying to add exportable support for wysiwyg in #624018: Exportables and Features support for WYSIWYG 7.x.

Solution looks to be to pull the is_new flag setting out of the if clause in EntityAPIController::create().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nedjo’s picture

Status: Active » Needs review
FileSize
5.06 KB
942 bytes

Draft patch, untested.

nedjo’s picture

Oops, only meant to upload the second of those.

fago’s picture

Status: Needs review » Fixed

Good catch, committed.

>Ran into this problem when trying to add exportable support for wysiwyg in #624018: Exportables and Features support.
Oh, I wasn't aware of that. Awesome!

Status: Fixed » Closed (fixed)

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