In previous versions of field_collection, the live previews provided by Panopoly would render field_collections just fine!
This worked by Panopoly getting the data from the form and creating an unsaved field_collection entity with the field data on it, and the default field formatter would render it as expected. However, with #1427158: Use field_collection_field_formatter_prepare_view to increase performance by 50%, the field_collection_entity_preload() (called from field_collection_field_formatter_prepare_view()) will always attempt to load the entities from the database (or cache of previously loaded entities), but these entities have never been saved to the database.
One potential fix, is to have field_collection_entity_preload() check if the entities are already present, and if so, don't attempt to load them.
I'll attach a patch that does this in a little bit.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | field_collection-panopoly-3111102-2.patch | 665 bytes | dsnopek |
Comments
Comment #2
dsnopekPatch is attached!
This requires some changes to panopoly_magic too, which I'll get on #3108161: panopoly_magic doesn't render previews for field_collection's with field_collection 7.x-1.1 in a moment.
Comment #3
cboyden commentedWe've been using this patch on a Panopoly child distribution and it's working as expected. Live previews of field collections are working OK and we haven't seen any side effects.
Comment #4
ram4nd commented