Posted by nedjo on February 1, 2011 at 3:17am
3 followers
| Project: | Entity API |
| Version: | 7.x-1.x-dev |
| Component: | Entity CRUD controller |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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().
Comments
#1
Draft patch, untested.
#2
Oops, only meant to upload the second of those.
#3
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!
#4
Automatically closed -- issue fixed for 2 weeks with no activity.