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.

CommentFileSizeAuthor
#2 field_collection-panopoly-3111102-2.patch665 bytesdsnopek

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new665 bytes

Patch 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.

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

We'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.

ram4nd’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -panopoly

  • ram4nd committed a39d45f on 7.x-1.x authored by dsnopek
    Issue #3111102 by dsnopek, cboyden: No longer working with live previews...

Status: Fixed » Closed (fixed)

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