Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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().
Comment | File | Size | Author |
---|---|---|---|
#1 | 1047032-1-entity-create-is_new.patch | 942 bytes | nedjo |
Comments
Comment #1
nedjoDraft patch, untested.
Comment #2
nedjoOops, only meant to upload the second of those.
Comment #3
fagoGood 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!