When a new field collection is created and attached to its host, it cannot be accessed via a EntityListWrapper until it have been saved.
This change coupled with #1587882: Allow getter callbaks to provide lists of entity objects allows for the EntityListWrapper to access a list with both ids and entities making it much easier to manage field collections before they are saved.
Also when you have multiple new field collections there is a bug in which the field language is returned as 0 unstead of (normally) und. This is fixed in #1587874: field_language() caching to strict when creating multiple new entity types with different bundles.
Comment | File | Size | Author |
---|---|---|---|
#8 | field_collection-1587888-8.patch | 940 bytes | RoSk0 |
|
Comments
Comment #1
geek-merlincurrent source tells us that this is fixed for single value fields but needs a fix in the wrapper for multiple valued ones.
did not check that though.
would be great to have.
Comment #2
geek-merlinpatch_commit_7703becd22b5.patch queued for re-testing.
Comment #3
Jelle_SWhile we wait for #1587882: Allow getter callbaks to provide lists of entity objects to get committed, we could already fix the issue where metadata wrappers do not work on multi-value field collection items in
hook_entity_presave
Steps to reproduce:
Comment #5
Jelle_SComment #8
RoSk0Patch to implement requested functionality. Depends on #1587882: Allow getter callbaks to provide lists of entity objects.