Problem/Motivation

EntityFieldRenderer has $this->entityManager = $entity_manager; where entity manager has ContainerAwareTrait but not DependencySerializationTrait. Most of the time this doesn't blow up because PluginBase has DependencySerializationTrait but EntityFieldRenderer is not a plugin.

Proposed resolution

Add DST to EFR.

Remaining tasks

Maybe test this. Very complicated: it's possble this only breaks with searchapi. Not sure. I am having a form where upon rebuild a view is inserted into the form and this blows up. Also, I put $view->render() in a form instead of #type view, #type view does not blow up. Is it worth the bothering to test?

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 efr_broken.patch764 byteschx
efr_broken.patch764 byteschx

Comments

chx created an issue. See original summary.

chx’s picture

StatusFileSize
new764 bytes
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Yeah that class is neither a service NOR a plugin, which is problematic of course.

chx’s picture

Issue summary: View changes
chx’s picture

Issue summary: View changes

  • catch committed f312afb on 8.2.x
    Issue #2682339 by chx: EntityFieldRenderer breaks embedding in forms
    

  • catch committed 52a855a on 8.1.x
    Issue #2682339 by chx: EntityFieldRenderer breaks embedding in forms
    
    (...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!

I also don't think test coverage is particularly helpful here.

Status: Fixed » Closed (fixed)

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